From ac63afaea81f00de5261d7ba84ec220054b398c4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 17 Oct 2022 17:36:47 +0000 Subject: [PATCH] CodeGen from PR 21155 in Azure/azure-rest-api-specs Merge 302a8842e146f42a4325b47171d19d8d424de9f3 into 6c81b8f165ec787728ad1ec286d2d7feabb64da0 --- .../generated/api/AzureMediaServices.cs | 20243 ++++++++++++++++ .../mediaservices/generated/api/Models/Any.cs | 34 + .../generated/api/Models/Any.json.cs | 104 + .../api/Models/Api20/ErrorAdditionalInfo.cs | 74 + .../Models/Api20/ErrorAdditionalInfo.json.cs | 116 + .../generated/api/Models/Api20/ErrorDetail.cs | 134 + .../api/Models/Api20/ErrorDetail.json.cs | 147 + .../api/Models/Api20/ErrorResponse.cs | 136 + .../api/Models/Api20/ErrorResponse.json.cs | 111 + .../api/Models/Api20/PrivateEndpoint.cs | 54 + .../api/Models/Api20/PrivateEndpoint.json.cs | 111 + .../Models/Api20/PrivateEndpointConnection.cs | 190 + .../Api20/PrivateEndpointConnection.json.cs | 110 + .../PrivateEndpointConnectionListResult.cs | 53 + ...rivateEndpointConnectionListResult.json.cs | 119 + .../PrivateEndpointConnectionProperties.cs | 153 + ...rivateEndpointConnectionProperties.json.cs | 116 + .../api/Models/Api20/PrivateLinkResource.cs | 138 + .../Models/Api20/PrivateLinkResource.json.cs | 110 + .../Api20/PrivateLinkResourceListResult.cs | 51 + .../PrivateLinkResourceListResult.json.cs | 116 + .../Api20/PrivateLinkResourceProperties.cs | 91 + .../PrivateLinkResourceProperties.json.cs | 134 + .../PrivateLinkServiceConnectionState.cs | 99 + .../PrivateLinkServiceConnectionState.json.cs | 114 + .../api/Models/Api20/ProxyResource.cs | 80 + .../api/Models/Api20/ProxyResource.json.cs | 110 + .../generated/api/Models/Api20/Resource.cs | 108 + .../api/Models/Api20/Resource.json.cs | 123 + .../generated/api/Models/Api20/SystemData.cs | 136 + .../api/Models/Api20/SystemData.json.cs | 118 + .../api/Models/Api20/TrackedResource.cs | 114 + .../api/Models/Api20/TrackedResource.json.cs | 114 + .../api/Models/Api20/TrackedResourceTags.cs | 35 + .../Api20/TrackedResourceTags.dictionary.cs | 75 + .../Models/Api20/TrackedResourceTags.json.cs | 109 + .../api/Models/Api20211101/AacAudio.cs | 92 + .../api/Models/Api20211101/AacAudio.json.cs | 110 + .../Models/Api20211101/AbsoluteClipTime.cs | 85 + .../Api20211101/AbsoluteClipTime.json.cs | 113 + .../api/Models/Api20211101/AccessControl.cs | 74 + .../Models/Api20211101/AccessControl.json.cs | 117 + .../Models/Api20211101/AccountEncryption.cs | 172 + .../Api20211101/AccountEncryption.json.cs | 116 + .../generated/api/Models/Api20211101/Audio.cs | 114 + .../api/Models/Api20211101/Audio.json.cs | 129 + .../Models/Api20211101/AudioAnalyzerPreset.cs | 155 + .../Api20211101/AudioAnalyzerPreset.json.cs | 132 + .../AudioAnalyzerPresetExperimentalOptions.cs | 37 + ...zerPresetExperimentalOptions.dictionary.cs | 75 + ...oAnalyzerPresetExperimentalOptions.json.cs | 112 + .../api/Models/Api20211101/AudioOverlay.cs | 102 + .../Models/Api20211101/AudioOverlay.json.cs | 108 + .../Api20211101/AudioTrackDescriptor.cs | 83 + .../Api20211101/AudioTrackDescriptor.json.cs | 129 + .../BuiltInStandardEncoderPreset.cs | 278 + .../BuiltInStandardEncoderPreset.json.cs | 114 + .../Api20211101/CheckNameAvailabilityInput.cs | 68 + .../CheckNameAvailabilityInput.json.cs | 110 + .../api/Models/Api20211101/ClipTime.cs | 53 + .../api/Models/Api20211101/ClipTime.json.cs | 129 + .../generated/api/Models/Api20211101/Codec.cs | 74 + .../api/Models/Api20211101/Codec.json.cs | 161 + .../api/Models/Api20211101/CopyAudio.cs | 63 + .../api/Models/Api20211101/CopyAudio.json.cs | 108 + .../api/Models/Api20211101/CopyVideo.cs | 65 + .../api/Models/Api20211101/CopyVideo.json.cs | 110 + .../api/Models/Api20211101/Deinterlace.cs | 68 + .../Models/Api20211101/Deinterlace.json.cs | 110 + .../api/Models/Api20211101/EdgePolicies.cs | 137 + .../Models/Api20211101/EdgePolicies.json.cs | 107 + .../EdgeUsageDataCollectionPolicy.cs | 142 + .../EdgeUsageDataCollectionPolicy.json.cs | 113 + .../Api20211101/EdgeUsageDataEventHub.cs | 82 + .../Api20211101/EdgeUsageDataEventHub.json.cs | 111 + .../EntityNameAvailabilityCheckOutput.cs | 85 + .../EntityNameAvailabilityCheckOutput.json.cs | 112 + .../Models/Api20211101/FaceDetectorPreset.cs | 175 + .../Api20211101/FaceDetectorPreset.json.cs | 119 + .../FaceDetectorPresetExperimentalOptions.cs | 37 + ...torPresetExperimentalOptions.dictionary.cs | 75 + ...eDetectorPresetExperimentalOptions.json.cs | 112 + .../api/Models/Api20211101/Filters.cs | 229 + .../api/Models/Api20211101/Filters.json.cs | 125 + .../api/Models/Api20211101/Format.cs | 95 + .../api/Models/Api20211101/Format.json.cs | 145 + .../Models/Api20211101/FromAllInputFile.cs | 71 + .../Api20211101/FromAllInputFile.json.cs | 112 + .../Models/Api20211101/FromEachInputFile.cs | 68 + .../Api20211101/FromEachInputFile.json.cs | 111 + .../api/Models/Api20211101/H264Layer.cs | 276 + .../api/Models/Api20211101/H264Layer.json.cs | 123 + .../api/Models/Api20211101/H264Video.cs | 164 + .../api/Models/Api20211101/H264Video.json.cs | 124 + .../api/Models/Api20211101/H265Layer.cs | 250 + .../api/Models/Api20211101/H265Layer.json.cs | 121 + .../api/Models/Api20211101/H265Video.cs | 153 + .../api/Models/Api20211101/H265Video.json.cs | 122 + .../api/Models/Api20211101/H265VideoLayer.cs | 238 + .../Models/Api20211101/H265VideoLayer.json.cs | 122 + .../generated/api/Models/Api20211101/Image.cs | 195 + .../api/Models/Api20211101/Image.json.cs | 133 + .../api/Models/Api20211101/ImageFormat.cs | 70 + .../Models/Api20211101/ImageFormat.json.cs | 108 + .../api/Models/Api20211101/InputDefinition.cs | 76 + .../Api20211101/InputDefinition.json.cs | 143 + .../api/Models/Api20211101/InputFile.cs | 82 + .../api/Models/Api20211101/InputFile.json.cs | 112 + .../generated/api/Models/Api20211101/Job.cs | 375 + .../api/Models/Api20211101/Job.json.cs | 117 + .../api/Models/Api20211101/JobCollection.cs | 74 + .../Models/Api20211101/JobCollection.json.cs | 118 + .../api/Models/Api20211101/JobError.cs | 140 + .../api/Models/Api20211101/JobError.json.cs | 139 + .../api/Models/Api20211101/JobErrorDetail.cs | 74 + .../Models/Api20211101/JobErrorDetail.json.cs | 116 + .../api/Models/Api20211101/JobInput.cs | 51 + .../api/Models/Api20211101/JobInput.json.cs | 139 + .../api/Models/Api20211101/JobInputAsset.cs | 117 + .../Models/Api20211101/JobInputAsset.json.cs | 110 + .../api/Models/Api20211101/JobInputClip.cs | 200 + .../Models/Api20211101/JobInputClip.json.cs | 153 + .../api/Models/Api20211101/JobInputHttp.cs | 129 + .../Models/Api20211101/JobInputHttp.json.cs | 110 + .../Models/Api20211101/JobInputSequence.cs | 76 + .../Api20211101/JobInputSequence.json.cs | 120 + .../api/Models/Api20211101/JobInputs.cs | 74 + .../api/Models/Api20211101/JobInputs.json.cs | 118 + .../api/Models/Api20211101/JobOutput.cs | 310 + .../api/Models/Api20211101/JobOutput.json.cs | 152 + .../api/Models/Api20211101/JobOutputAsset.cs | 169 + .../Models/Api20211101/JobOutputAsset.json.cs | 110 + .../api/Models/Api20211101/JobProperties.cs | 255 + .../Models/Api20211101/JobProperties.json.cs | 149 + .../JobPropertiesCorrelationData.cs | 37 + ...JobPropertiesCorrelationData.dictionary.cs | 75 + .../JobPropertiesCorrelationData.json.cs | 111 + .../api/Models/Api20211101/JpgFormat.cs | 70 + .../api/Models/Api20211101/JpgFormat.json.cs | 108 + .../api/Models/Api20211101/JpgImage.cs | 165 + .../api/Models/Api20211101/JpgImage.json.cs | 122 + .../api/Models/Api20211101/JpgLayer.cs | 97 + .../api/Models/Api20211101/JpgLayer.json.cs | 110 + .../api/Models/Api20211101/KeyDelivery.cs | 80 + .../Models/Api20211101/KeyDelivery.json.cs | 107 + .../Models/Api20211101/KeyVaultProperties.cs | 83 + .../Api20211101/KeyVaultProperties.json.cs | 112 + .../generated/api/Models/Api20211101/Layer.cs | 117 + .../api/Models/Api20211101/Layer.json.cs | 115 + .../Api20211101/ListEdgePoliciesInput.cs | 48 + .../Api20211101/ListEdgePoliciesInput.json.cs | 107 + .../Models/Api20211101/LogSpecification.cs | 94 + .../Api20211101/LogSpecification.json.cs | 121 + .../api/Models/Api20211101/MediaService.cs | 605 + .../Models/Api20211101/MediaService.json.cs | 117 + .../Api20211101/MediaServiceCollection.cs | 74 + .../MediaServiceCollection.json.cs | 118 + .../Api20211101/MediaServiceIdentity.cs | 105 + .../Api20211101/MediaServiceIdentity.json.cs | 119 + .../MediaServiceOperationStatus.cs | 216 + .../MediaServiceOperationStatus.json.cs | 118 + .../Api20211101/MediaServiceProperties.cs | 337 + .../MediaServiceProperties.json.cs | 147 + .../Models/Api20211101/MediaServiceUpdate.cs | 408 + .../Api20211101/MediaServiceUpdate.json.cs | 112 + .../Api20211101/MediaServiceUpdateTags.cs | 35 + .../MediaServiceUpdateTags.dictionary.cs | 75 + .../MediaServiceUpdateTags.json.cs | 109 + .../api/Models/Api20211101/MetricDimension.cs | 94 + .../Api20211101/MetricDimension.json.cs | 121 + .../Models/Api20211101/MetricSpecification.cs | 271 + .../Api20211101/MetricSpecification.json.cs | 187 + .../api/Models/Api20211101/Mp4Format.cs | 77 + .../api/Models/Api20211101/Mp4Format.json.cs | 108 + .../Models/Api20211101/MultiBitrateFormat.cs | 104 + .../Api20211101/MultiBitrateFormat.json.cs | 141 + .../api/Models/Api20211101/Operation.cs | 221 + .../api/Models/Api20211101/Operation.json.cs | 118 + .../Models/Api20211101/OperationCollection.cs | 51 + .../Api20211101/OperationCollection.json.cs | 116 + .../Models/Api20211101/OperationDisplay.cs | 102 + .../Api20211101/OperationDisplay.json.cs | 114 + .../api/Models/Api20211101/OutputFile.cs | 66 + .../api/Models/Api20211101/OutputFile.json.cs | 116 + .../api/Models/Api20211101/Overlay.cs | 216 + .../api/Models/Api20211101/Overlay.json.cs | 139 + .../api/Models/Api20211101/PngFormat.cs | 70 + .../api/Models/Api20211101/PngFormat.json.cs | 108 + .../api/Models/Api20211101/PngImage.cs | 133 + .../api/Models/Api20211101/PngImage.json.cs | 120 + .../api/Models/Api20211101/PngLayer.cs | 74 + .../api/Models/Api20211101/PngLayer.json.cs | 108 + .../api/Models/Api20211101/Preset.cs | 53 + .../api/Models/Api20211101/Preset.json.cs | 141 + .../Api20211101/PresetConfigurations.cs | 242 + .../Api20211101/PresetConfigurations.json.cs | 122 + .../api/Models/Api20211101/Properties.cs | 80 + .../api/Models/Api20211101/Properties.json.cs | 111 + .../api/Models/Api20211101/Rectangle.cs | 140 + .../api/Models/Api20211101/Rectangle.json.cs | 116 + .../Models/Api20211101/ResourceIdentity.cs | 71 + .../Api20211101/ResourceIdentity.json.cs | 109 + .../SelectAudioTrackByAttribute.cs | 129 + .../SelectAudioTrackByAttribute.json.cs | 116 + .../Api20211101/SelectAudioTrackById.cs | 81 + .../Api20211101/SelectAudioTrackById.json.cs | 110 + .../SelectVideoTrackByAttribute.cs | 128 + .../SelectVideoTrackByAttribute.json.cs | 116 + .../Api20211101/SelectVideoTrackById.cs | 74 + .../Api20211101/SelectVideoTrackById.json.cs | 110 + .../Api20211101/ServiceSpecification.cs | 74 + .../Api20211101/ServiceSpecification.json.cs | 132 + .../Api20211101/StandardEncoderPreset.cs | 279 + .../Api20211101/StandardEncoderPreset.json.cs | 132 + .../api/Models/Api20211101/StorageAccount.cs | 146 + .../Models/Api20211101/StorageAccount.json.cs | 117 + .../Api20211101/SyncStorageKeysInput.cs | 51 + .../Api20211101/SyncStorageKeysInput.json.cs | 108 + .../api/Models/Api20211101/TrackDescriptor.cs | 56 + .../Api20211101/TrackDescriptor.json.cs | 146 + .../api/Models/Api20211101/Transform.cs | 265 + .../api/Models/Api20211101/Transform.json.cs | 118 + .../Models/Api20211101/TransformCollection.cs | 74 + .../Api20211101/TransformCollection.json.cs | 118 + .../api/Models/Api20211101/TransformOutput.cs | 123 + .../Api20211101/TransformOutput.json.cs | 114 + .../Models/Api20211101/TransformProperties.cs | 120 + .../Api20211101/TransformProperties.json.cs | 128 + .../Api20211101/TransportStreamFormat.cs | 79 + .../Api20211101/TransportStreamFormat.json.cs | 110 + .../UserAssignedManagedIdentities.cs | 35 + ...serAssignedManagedIdentities.dictionary.cs | 75 + .../UserAssignedManagedIdentities.json.cs | 109 + .../UserAssignedManagedIdentity.cs | 71 + .../UserAssignedManagedIdentity.json.cs | 115 + .../api/Models/Api20211101/UtcClipTime.cs | 79 + .../Models/Api20211101/UtcClipTime.json.cs | 113 + .../generated/api/Models/Api20211101/Video.cs | 132 + .../api/Models/Api20211101/Video.json.cs | 145 + .../Models/Api20211101/VideoAnalyzerPreset.cs | 120 + .../Api20211101/VideoAnalyzerPreset.json.cs | 112 + .../api/Models/Api20211101/VideoLayer.cs | 238 + .../api/Models/Api20211101/VideoLayer.json.cs | 122 + .../api/Models/Api20211101/VideoOverlay.cs | 333 + .../Models/Api20211101/VideoOverlay.json.cs | 114 + .../Api20211101/VideoTrackDescriptor.cs | 57 + .../Api20211101/VideoTrackDescriptor.json.cs | 108 + .../api/Models/Api20220801/AccountFilter.cs | 308 + .../Models/Api20220801/AccountFilter.json.cs | 115 + .../Api20220801/AccountFilterCollection.cs | 74 + .../AccountFilterCollection.json.cs | 118 + .../Models/Api20220801/AkamaiAccessControl.cs | 53 + .../Api20220801/AkamaiAccessControl.json.cs | 116 + .../AkamaiSignatureHeaderAuthenticationKey.cs | 85 + ...aiSignatureHeaderAuthenticationKey.json.cs | 113 + .../ArmStreamingEndpointCapacity.cs | 104 + .../ArmStreamingEndpointCapacity.json.cs | 117 + .../ArmStreamingEndpointCurrentSku.cs | 71 + .../ArmStreamingEndpointCurrentSku.json.cs | 113 + .../Api20220801/ArmStreamingEndpointSku.cs | 54 + .../ArmStreamingEndpointSku.json.cs | 111 + .../ArmStreamingEndpointSkuInfo.cs | 146 + .../ArmStreamingEndpointSkuInfo.json.cs | 111 + .../generated/api/Models/Api20220801/Asset.cs | 310 + .../api/Models/Api20220801/Asset.json.cs | 115 + .../api/Models/Api20220801/AssetCollection.cs | 74 + .../Api20220801/AssetCollection.json.cs | 118 + .../Models/Api20220801/AssetContainerSas.cs | 51 + .../Api20220801/AssetContainerSas.json.cs | 116 + .../AssetFileEncryptionMetadata.cs | 85 + .../AssetFileEncryptionMetadata.json.cs | 112 + .../api/Models/Api20220801/AssetFilter.cs | 308 + .../Models/Api20220801/AssetFilter.json.cs | 115 + .../Api20220801/AssetFilterCollection.cs | 74 + .../Api20220801/AssetFilterCollection.json.cs | 118 + .../api/Models/Api20220801/AssetProperties.cs | 182 + .../Api20220801/AssetProperties.json.cs | 134 + .../Api20220801/AssetStreamingLocator.cs | 194 + .../Api20220801/AssetStreamingLocator.json.cs | 146 + .../api/Models/Api20220801/AssetTrack.cs | 190 + .../api/Models/Api20220801/AssetTrack.json.cs | 110 + .../Api20220801/AssetTrackCollection.cs | 51 + .../Api20220801/AssetTrackCollection.json.cs | 116 + .../Api20220801/AssetTrackOperationStatus.cs | 216 + .../AssetTrackOperationStatus.json.cs | 118 + .../Api20220801/AssetTrackProperties.cs | 80 + .../Api20220801/AssetTrackProperties.json.cs | 113 + .../Api20220801/AsyncOperationResult.cs | 165 + .../Api20220801/AsyncOperationResult.json.cs | 112 + .../api/Models/Api20220801/AudioTrack.cs | 237 + .../api/Models/Api20220801/AudioTrack.json.cs | 125 + .../Api20220801/CbcsDrmConfiguration.cs | 196 + .../Api20220801/CbcsDrmConfiguration.json.cs | 114 + .../Api20220801/CencDrmConfiguration.cs | 138 + .../Api20220801/CencDrmConfiguration.json.cs | 112 + .../ClearKeyEncryptionConfiguration.cs | 68 + .../ClearKeyEncryptionConfiguration.json.cs | 110 + .../Api20220801/CommonEncryptionCbcs.cs | 378 + .../Api20220801/CommonEncryptionCbcs.json.cs | 124 + .../Api20220801/CommonEncryptionCenc.cs | 327 + .../Api20220801/CommonEncryptionCenc.json.cs | 124 + .../Models/Api20220801/ContentKeyPolicy.cs | 265 + .../Api20220801/ContentKeyPolicy.json.cs | 115 + .../ContentKeyPolicyClearKeyConfiguration.cs | 57 + ...tentKeyPolicyClearKeyConfiguration.json.cs | 109 + .../Api20220801/ContentKeyPolicyCollection.cs | 74 + .../ContentKeyPolicyCollection.json.cs | 118 + .../ContentKeyPolicyConfiguration.cs | 53 + .../ContentKeyPolicyConfiguration.json.cs | 141 + .../ContentKeyPolicyFairPlayConfiguration.cs | 194 + ...tentKeyPolicyFairPlayConfiguration.json.cs | 121 + ...olicyFairPlayOfflineRentalConfiguration.cs | 67 + ...FairPlayOfflineRentalConfiguration.json.cs | 112 + .../ContentKeyPolicyOpenRestriction.cs | 59 + .../ContentKeyPolicyOpenRestriction.json.cs | 110 + .../Api20220801/ContentKeyPolicyOption.cs | 123 + .../ContentKeyPolicyOption.json.cs | 117 + .../ContentKeyPolicyPlayReadyConfiguration.cs | 91 + ...entKeyPolicyPlayReadyConfiguration.json.cs | 121 + ...PlayReadyContentEncryptionKeyFromHeader.cs | 59 + ...eadyContentEncryptionKeyFromHeader.json.cs | 111 + ...dyContentEncryptionKeyFromKeyIdentifier.cs | 76 + ...tentEncryptionKeyFromKeyIdentifier.json.cs | 113 + ...entKeyPolicyPlayReadyContentKeyLocation.cs | 55 + ...yPolicyPlayReadyContentKeyLocation.json.cs | 132 + ...eadyExplicitAnalogTelevisionRestriction.cs | 75 + ...xplicitAnalogTelevisionRestriction.json.cs | 116 + .../ContentKeyPolicyPlayReadyLicense.cs | 465 + .../ContentKeyPolicyPlayReadyLicense.json.cs | 128 + .../ContentKeyPolicyPlayReadyPlayRight.cs | 328 + ...ContentKeyPolicyPlayReadyPlayRight.json.cs | 133 + .../Api20220801/ContentKeyPolicyProperties.cs | 128 + .../ContentKeyPolicyProperties.json.cs | 133 + .../ContentKeyPolicyRestriction.cs | 53 + .../ContentKeyPolicyRestriction.json.cs | 133 + .../ContentKeyPolicyRestrictionTokenKey.cs | 53 + ...ontentKeyPolicyRestrictionTokenKey.json.cs | 134 + .../ContentKeyPolicyRsaTokenKey.cs | 91 + .../ContentKeyPolicyRsaTokenKey.json.cs | 112 + .../ContentKeyPolicySymmetricTokenKey.cs | 74 + .../ContentKeyPolicySymmetricTokenKey.json.cs | 110 + .../Api20220801/ContentKeyPolicyTokenClaim.cs | 68 + .../ContentKeyPolicyTokenClaim.json.cs | 110 + .../ContentKeyPolicyTokenRestriction.cs | 187 + .../ContentKeyPolicyTokenRestriction.json.cs | 140 + .../ContentKeyPolicyUnknownConfiguration.cs | 59 + ...ntentKeyPolicyUnknownConfiguration.json.cs | 111 + .../ContentKeyPolicyUnknownRestriction.cs | 59 + ...ContentKeyPolicyUnknownRestriction.json.cs | 111 + .../ContentKeyPolicyWidevineConfiguration.cs | 74 + ...tentKeyPolicyWidevineConfiguration.json.cs | 111 + ...ContentKeyPolicyX509CertificateTokenKey.cs | 80 + ...ntKeyPolicyX509CertificateTokenKey.json.cs | 112 + .../Api20220801/CrossSiteAccessPolicies.cs | 68 + .../CrossSiteAccessPolicies.json.cs | 110 + .../api/Models/Api20220801/DashSettings.cs | 51 + .../Models/Api20220801/DashSettings.json.cs | 108 + .../api/Models/Api20220801/DefaultKey.cs | 68 + .../api/Models/Api20220801/DefaultKey.json.cs | 110 + .../Models/Api20220801/EnabledProtocols.cs | 102 + .../Api20220801/EnabledProtocols.json.cs | 114 + .../Models/Api20220801/EnvelopeEncryption.cs | 214 + .../Api20220801/EnvelopeEncryption.json.cs | 122 + .../FilterTrackPropertyCondition.cs | 85 + .../FilterTrackPropertyCondition.json.cs | 112 + .../Api20220801/FilterTrackSelection.cs | 53 + .../Api20220801/FilterTrackSelection.json.cs | 118 + .../api/Models/Api20220801/FirstQuality.cs | 51 + .../Models/Api20220801/FirstQuality.json.cs | 108 + .../generated/api/Models/Api20220801/Hls.cs | 60 + .../api/Models/Api20220801/Hls.json.cs | 108 + .../api/Models/Api20220801/HlsSettings.cs | 85 + .../Models/Api20220801/HlsSettings.json.cs | 112 + .../api/Models/Api20220801/IPAccessControl.cs | 51 + .../Api20220801/IPAccessControl.json.cs | 116 + .../api/Models/Api20220801/IPRange.cs | 85 + .../api/Models/Api20220801/IPRange.json.cs | 112 + .../Api20220801/ListContainerSasInput.cs | 74 + .../Api20220801/ListContainerSasInput.json.cs | 110 + .../Api20220801/ListContentKeysResponse.cs | 51 + .../ListContentKeysResponse.json.cs | 116 + .../Models/Api20220801/ListPathsResponse.cs | 68 + .../Api20220801/ListPathsResponse.json.cs | 126 + .../ListStreamingLocatorsResponse.cs | 54 + .../ListStreamingLocatorsResponse.json.cs | 119 + .../api/Models/Api20220801/LiveEvent.cs | 757 + .../api/Models/Api20220801/LiveEvent.json.cs | 115 + .../Api20220801/LiveEventActionInput.cs | 60 + .../Api20220801/LiveEventActionInput.json.cs | 108 + .../Models/Api20220801/LiveEventEncoding.cs | 152 + .../Api20220801/LiveEventEncoding.json.cs | 116 + .../Models/Api20220801/LiveEventEndpoint.cs | 68 + .../Api20220801/LiveEventEndpoint.json.cs | 110 + .../api/Models/Api20220801/LiveEventInput.cs | 157 + .../Models/Api20220801/LiveEventInput.json.cs | 124 + .../LiveEventInputAccessControl.cs | 60 + .../LiveEventInputAccessControl.json.cs | 108 + .../LiveEventInputTrackSelection.cs | 105 + .../LiveEventInputTrackSelection.json.cs | 114 + .../Models/Api20220801/LiveEventListResult.cs | 91 + .../Api20220801/LiveEventListResult.json.cs | 120 + .../LiveEventOutputTranscriptionTrack.cs | 62 + .../LiveEventOutputTranscriptionTrack.json.cs | 111 + .../Models/Api20220801/LiveEventPreview.cs | 169 + .../Api20220801/LiveEventPreview.json.cs | 124 + .../LiveEventPreviewAccessControl.cs | 60 + .../LiveEventPreviewAccessControl.json.cs | 108 + .../Models/Api20220801/LiveEventProperties.cs | 660 + .../Api20220801/LiveEventProperties.json.cs | 160 + .../Api20220801/LiveEventTranscription.cs | 132 + .../LiveEventTranscription.json.cs | 123 + .../api/Models/Api20220801/LiveOutput.cs | 405 + .../api/Models/Api20220801/LiveOutput.json.cs | 115 + .../Api20220801/LiveOutputListResult.cs | 91 + .../Api20220801/LiveOutputListResult.json.cs | 120 + .../Api20220801/LiveOutputProperties.cs | 290 + .../Api20220801/LiveOutputProperties.json.cs | 140 + .../Api20220801/MediaFilterProperties.cs | 173 + .../Api20220801/MediaFilterProperties.json.cs | 120 + .../api/Models/Api20220801/NoEncryption.cs | 102 + .../Models/Api20220801/NoEncryption.json.cs | 108 + .../Api20220801/PresentationTimeRange.cs | 138 + .../Api20220801/PresentationTimeRange.json.cs | 120 + .../StorageEncryptedAssetDecryptionData.cs | 68 + ...torageEncryptedAssetDecryptionData.json.cs | 119 + .../Models/Api20220801/StreamingEndpoint.cs | 527 + .../Api20220801/StreamingEndpoint.json.cs | 117 + .../StreamingEndpointAccessControl.cs | 86 + .../StreamingEndpointAccessControl.json.cs | 110 + .../StreamingEndpointListResult.cs | 91 + .../StreamingEndpointListResult.json.cs | 120 + .../StreamingEndpointProperties.cs | 380 + .../StreamingEndpointProperties.json.cs | 164 + .../StreamingEndpointSkuInfoListResult.cs | 48 + ...StreamingEndpointSkuInfoListResult.json.cs | 116 + .../Api20220801/StreamingEntityScaleUnit.cs | 51 + .../StreamingEntityScaleUnit.json.cs | 108 + .../Models/Api20220801/StreamingLocator.cs | 344 + .../Api20220801/StreamingLocator.json.cs | 115 + .../Api20220801/StreamingLocatorCollection.cs | 74 + .../StreamingLocatorCollection.json.cs | 118 + .../Api20220801/StreamingLocatorContentKey.cs | 145 + .../StreamingLocatorContentKey.json.cs | 135 + .../Api20220801/StreamingLocatorProperties.cs | 222 + .../StreamingLocatorProperties.json.cs | 145 + .../api/Models/Api20220801/StreamingPath.cs | 85 + .../Models/Api20220801/StreamingPath.json.cs | 120 + .../api/Models/Api20220801/StreamingPolicy.cs | 1023 + .../Api20220801/StreamingPolicy.json.cs | 115 + .../Api20220801/StreamingPolicyCollection.cs | 74 + .../StreamingPolicyCollection.json.cs | 118 + .../Api20220801/StreamingPolicyContentKey.cs | 85 + .../StreamingPolicyContentKey.json.cs | 120 + .../Api20220801/StreamingPolicyContentKeys.cs | 91 + .../StreamingPolicyContentKeys.json.cs | 118 + .../StreamingPolicyFairPlayConfiguration.cs | 86 + ...reamingPolicyFairPlayConfiguration.json.cs | 111 + .../StreamingPolicyPlayReadyConfiguration.cs | 86 + ...eamingPolicyPlayReadyConfiguration.json.cs | 111 + .../Api20220801/StreamingPolicyProperties.cs | 905 + .../StreamingPolicyProperties.json.cs | 121 + .../StreamingPolicyWidevineConfiguration.cs | 69 + ...reamingPolicyWidevineConfiguration.json.cs | 109 + .../api/Models/Api20220801/TextTrack.cs | 208 + .../api/Models/Api20220801/TextTrack.json.cs | 123 + .../api/Models/Api20220801/TrackBase.cs | 53 + .../api/Models/Api20220801/TrackBase.json.cs | 133 + .../Api20220801/TrackPropertyCondition.cs | 85 + .../TrackPropertyCondition.json.cs | 112 + .../api/Models/Api20220801/TrackSelection.cs | 51 + .../Models/Api20220801/TrackSelection.json.cs | 116 + .../api/Models/Api20220801/VideoTrack.cs | 57 + .../api/Models/Api20220801/VideoTrack.json.cs | 108 + .../api/Models/MediaServicesIdentity.cs | 336 + .../api/Models/MediaServicesIdentity.json.cs | 141 + ...rationResultsGetAcceptedResponseHeaders.cs | 97 + ...nResultsGetAcceptedResponseHeaders.json.cs | 108 + ...rationResultsGetAcceptedResponseHeaders.cs | 97 + ...nResultsGetAcceptedResponseHeaders.json.cs | 107 + .../TracksDeleteAcceptedResponseHeaders.cs | 95 + ...racksDeleteAcceptedResponseHeaders.json.cs | 106 + ...sUpdateTrackDataAcceptedResponseHeaders.cs | 97 + ...teTrackDataAcceptedResponseHeaders.json.cs | 108 + .../generated/api/Support/AacAudioProfile.cs | 105 + .../api/Support/AccountEncryptionKeyType.cs | 100 + .../generated/api/Support/ActionType.cs | 97 + .../api/Support/AnalysisResolution.cs | 105 + .../api/Support/AssetContainerPermission.cs | 103 + .../Support/AssetStorageEncryptionFormat.cs | 106 + .../api/Support/AsyncOperationStatus.cs | 100 + .../generated/api/Support/AttributeFilter.cs | 114 + .../api/Support/AudioAnalysisMode.cs | 109 + .../generated/api/Support/BlurType.cs | 109 + .../generated/api/Support/ChannelMapping.cs | 121 + .../generated/api/Support/Complexity.cs | 113 + ...tKeyPolicyFairPlayRentalAndLeaseKeyType.cs | 125 + .../ContentKeyPolicyPlayReadyContentType.cs | 114 + .../ContentKeyPolicyPlayReadyLicenseType.cs | 111 + ...licyPlayReadyUnknownOutputPassingOption.cs | 135 + .../ContentKeyPolicyRestrictionTokenType.cs | 111 + .../generated/api/Support/CreatedByType.cs | 102 + .../generated/api/Support/DefaultAction.cs | 100 + .../generated/api/Support/DeinterlaceMode.cs | 100 + .../api/Support/DeinterlaceParity.cs | 103 + .../api/Support/EncoderNamedPreset.cs | 196 + .../generated/api/Support/EncryptionScheme.cs | 106 + .../generated/api/Support/EntropyMode.cs | 103 + .../generated/api/Support/FaceRedactorMode.cs | 116 + .../FilterTrackPropertyCompareOperation.cs | 106 + .../api/Support/FilterTrackPropertyType.cs | 112 + .../generated/api/Support/H264Complexity.cs | 112 + .../api/Support/H264RateControlMode.cs | 105 + .../generated/api/Support/H264VideoProfile.cs | 112 + .../generated/api/Support/H265Complexity.cs | 114 + .../generated/api/Support/H265VideoProfile.cs | 107 + .../generated/api/Support/InsightsType.cs | 115 + .../generated/api/Support/InterleaveOutput.cs | 103 + .../generated/api/Support/JobErrorCategory.cs | 109 + .../generated/api/Support/JobErrorCode.cs | 142 + .../generated/api/Support/JobRetry.cs | 107 + .../generated/api/Support/JobState.cs | 121 + .../api/Support/LiveEventEncodingType.cs | 129 + .../api/Support/LiveEventInputProtocol.cs | 104 + .../api/Support/LiveEventResourceState.cs | 139 + .../api/Support/LiveOutputResourceState.cs | 110 + .../api/Support/MetricAggregationType.cs | 103 + .../generated/api/Support/MetricUnit.cs | 103 + .../generated/api/Support/OnErrorType.cs | 108 + .../generated/api/Support/Priority.cs | 108 + ...vateEndpointConnectionProvisioningState.cs | 112 + .../PrivateEndpointServiceConnectionStatus.cs | 106 + .../api/Support/ProvisioningState.cs | 103 + .../api/Support/PublicNetworkAccess.cs | 102 + .../generated/api/Support/Rotation.cs | 116 + .../generated/api/Support/SecurityLevel.cs | 108 + .../api/Support/StorageAccountType.cs | 100 + .../api/Support/StorageAuthentication.cs | 99 + .../api/Support/StreamOptionsFlag.cs | 108 + .../Support/StreamingEndpointResourceState.cs | 120 + .../Support/StreamingLocatorContentKeyType.cs | 109 + .../StreamingPolicyStreamingProtocol.cs | 112 + .../generated/api/Support/StretchMode.cs | 117 + .../generated/api/Support/TrackAttribute.cs | 100 + .../Support/TrackPropertyCompareOperation.cs | 106 + .../api/Support/TrackPropertyType.cs | 100 + .../generated/api/Support/VideoSyncMode.cs | 121 + .../generated/api/Support/Visibility.cs | 104 + .../generated/runtime/CmdInfoHandler.cs | 40 + .../Conversions/ConversionException.cs | 17 + .../runtime/Conversions/IJsonConverter.cs | 13 + .../Conversions/Instances/BinaryConverter.cs | 24 + .../Conversions/Instances/BooleanConverter.cs | 13 + .../Instances/DateTimeConverter.cs | 18 + .../Instances/DateTimeOffsetConverter.cs | 15 + .../Conversions/Instances/DecimalConverter.cs | 16 + .../Conversions/Instances/DoubleConverter.cs | 13 + .../Conversions/Instances/EnumConverter.cs | 30 + .../Conversions/Instances/GuidConverter.cs | 15 + .../Instances/HashSet'1Converter.cs | 27 + .../Conversions/Instances/Int16Converter.cs | 13 + .../Conversions/Instances/Int32Converter.cs | 13 + .../Conversions/Instances/Int64Converter.cs | 13 + .../Instances/JsonArrayConverter.cs | 13 + .../Instances/JsonObjectConverter.cs | 13 + .../Conversions/Instances/SingleConverter.cs | 13 + .../Conversions/Instances/StringConverter.cs | 13 + .../Instances/TimeSpanConverter.cs | 15 + .../Conversions/Instances/UInt16Converter.cs | 13 + .../Conversions/Instances/UInt32Converter.cs | 13 + .../Conversions/Instances/UInt64Converter.cs | 13 + .../Conversions/Instances/UriConverter.cs | 15 + .../runtime/Conversions/JsonConverter.cs | 21 + .../Conversions/JsonConverterAttribute.cs | 18 + .../Conversions/JsonConverterFactory.cs | 91 + .../Conversions/StringLikeConverter.cs | 45 + .../Customizations/IJsonSerializable.cs | 263 + .../runtime/Customizations/JsonArray.cs | 13 + .../runtime/Customizations/JsonBoolean.cs | 16 + .../runtime/Customizations/JsonNode.cs | 21 + .../runtime/Customizations/JsonNumber.cs | 78 + .../runtime/Customizations/JsonObject.cs | 183 + .../runtime/Customizations/JsonString.cs | 34 + .../runtime/Customizations/XNodeArray.cs | 44 + .../generated/runtime/EventData.cs | 78 + .../generated/runtime/EventListener.cs | 247 + .../mediaservices/generated/runtime/Events.cs | 27 + .../generated/runtime/Extensions.cs | 117 + .../Extensions/StringBuilderExtensions.cs | 23 + .../Helpers/Extensions/TypeExtensions.cs | 61 + .../generated/runtime/Helpers/Seperator.cs | 11 + .../generated/runtime/Helpers/TypeDetails.cs | 116 + .../generated/runtime/Helpers/XHelper.cs | 75 + .../generated/runtime/IAssociativeArray.cs | 24 + .../generated/runtime/IHeaderSerializable.cs | 14 + .../generated/runtime/ISendAsync.cs | 300 + .../generated/runtime/InfoAttribute.cs | 34 + .../generated/runtime/Iso/IsoDate.cs | 214 + .../generated/runtime/JsonType.cs | 18 + .../mediaservices/generated/runtime/Method.cs | 19 + .../generated/runtime/Models/JsonMember.cs | 83 + .../generated/runtime/Models/JsonModel.cs | 89 + .../runtime/Models/JsonModelCache.cs | 19 + .../runtime/Nodes/Collections/JsonArray.cs | 65 + .../Nodes/Collections/XImmutableArray.cs | 62 + .../runtime/Nodes/Collections/XList.cs | 64 + .../runtime/Nodes/Collections/XNodeArray.cs | 68 + .../runtime/Nodes/Collections/XSet.cs | 60 + .../generated/runtime/Nodes/JsonBoolean.cs | 42 + .../generated/runtime/Nodes/JsonDate.cs | 173 + .../generated/runtime/Nodes/JsonNode.cs | 250 + .../generated/runtime/Nodes/JsonNumber.cs | 109 + .../generated/runtime/Nodes/JsonObject.cs | 172 + .../generated/runtime/Nodes/JsonString.cs | 42 + .../generated/runtime/Nodes/XBinary.cs | 40 + .../generated/runtime/Nodes/XNull.cs | 15 + .../Parser/Exceptions/ParseException.cs | 24 + .../generated/runtime/Parser/JsonParser.cs | 180 + .../generated/runtime/Parser/JsonToken.cs | 66 + .../generated/runtime/Parser/JsonTokenizer.cs | 177 + .../generated/runtime/Parser/Location.cs | 43 + .../runtime/Parser/Readers/SourceReader.cs | 130 + .../generated/runtime/Parser/TokenReader.cs | 39 + .../generated/runtime/PipelineMocking.cs | 262 + .../generated/runtime/Response.cs | 27 + .../runtime/Serialization/JsonSerializer.cs | 350 + .../Serialization/PropertyTransformation.cs | 21 + .../Serialization/SerializationOptions.cs | 65 + .../generated/runtime/SerializationMode.cs | 16 + .../runtime/UndeclaredResponseException.cs | 112 + .../generated/runtime/Writers/JsonWriter.cs | 223 + .../generated/runtime/delegates.cs | 23 + swaggerci/mediaservices/readme.md | 10 + 632 files changed, 95016 insertions(+) create mode 100644 swaggerci/mediaservices/generated/api/AzureMediaServices.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Any.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Any.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/ErrorAdditionalInfo.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/ErrorDetail.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/ErrorDetail.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/ErrorResponse.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/ErrorResponse.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpoint.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpoint.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionListResult.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionListResult.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResource.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResource.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceListResult.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceListResult.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkServiceConnectionState.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkServiceConnectionState.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/ProxyResource.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/ProxyResource.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/Resource.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/Resource.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/SystemData.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/SystemData.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/TrackedResource.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/TrackedResource.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.dictionary.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AacAudio.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AacAudio.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AbsoluteClipTime.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AbsoluteClipTime.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AccessControl.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AccessControl.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AccountEncryption.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AccountEncryption.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Audio.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Audio.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPreset.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPreset.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.dictionary.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AudioOverlay.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AudioOverlay.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AudioTrackDescriptor.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/AudioTrackDescriptor.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/BuiltInStandardEncoderPreset.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/BuiltInStandardEncoderPreset.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/CheckNameAvailabilityInput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/CheckNameAvailabilityInput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ClipTime.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ClipTime.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Codec.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Codec.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/CopyAudio.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/CopyAudio.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/CopyVideo.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/CopyVideo.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Deinterlace.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Deinterlace.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/EdgePolicies.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/EdgePolicies.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataCollectionPolicy.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataCollectionPolicy.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataEventHub.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataEventHub.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/EntityNameAvailabilityCheckOutput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/EntityNameAvailabilityCheckOutput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPreset.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPreset.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.dictionary.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Filters.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Filters.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Format.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Format.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/FromAllInputFile.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/FromAllInputFile.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/FromEachInputFile.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/FromEachInputFile.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H264Layer.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H264Layer.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H264Video.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H264Video.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H265Layer.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H265Layer.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H265Video.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H265Video.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H265VideoLayer.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/H265VideoLayer.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Image.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Image.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ImageFormat.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ImageFormat.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/InputDefinition.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/InputDefinition.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/InputFile.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/InputFile.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Job.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Job.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobError.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobError.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobErrorDetail.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobErrorDetail.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputAsset.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputAsset.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputClip.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputClip.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputHttp.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputHttp.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputSequence.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputSequence.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputs.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputs.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutputAsset.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutputAsset.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.dictionary.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JpgFormat.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JpgFormat.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JpgImage.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JpgImage.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JpgLayer.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/JpgLayer.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/KeyDelivery.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/KeyDelivery.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/KeyVaultProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/KeyVaultProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Layer.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Layer.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ListEdgePoliciesInput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ListEdgePoliciesInput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/LogSpecification.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/LogSpecification.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaService.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaService.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceIdentity.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceIdentity.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceOperationStatus.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceOperationStatus.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdate.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdate.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.dictionary.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MetricDimension.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MetricDimension.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MetricSpecification.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MetricSpecification.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Mp4Format.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Mp4Format.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MultiBitrateFormat.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/MultiBitrateFormat.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Operation.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Operation.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/OperationCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/OperationCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/OperationDisplay.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/OperationDisplay.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/OutputFile.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/OutputFile.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Overlay.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Overlay.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/PngFormat.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/PngFormat.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/PngImage.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/PngImage.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/PngLayer.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/PngLayer.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Preset.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Preset.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/PresetConfigurations.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/PresetConfigurations.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Properties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Properties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Rectangle.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Rectangle.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ResourceIdentity.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ResourceIdentity.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackByAttribute.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackByAttribute.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackById.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackById.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackByAttribute.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackByAttribute.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackById.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackById.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ServiceSpecification.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/ServiceSpecification.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/StandardEncoderPreset.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/StandardEncoderPreset.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/StorageAccount.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/StorageAccount.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SyncStorageKeysInput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/SyncStorageKeysInput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TrackDescriptor.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TrackDescriptor.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Transform.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Transform.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TransformCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TransformCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TransformOutput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TransformOutput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TransformProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TransformProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TransportStreamFormat.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/TransportStreamFormat.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.dictionary.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentity.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentity.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/UtcClipTime.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/UtcClipTime.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Video.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/Video.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/VideoAnalyzerPreset.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/VideoAnalyzerPreset.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/VideoLayer.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/VideoLayer.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/VideoOverlay.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/VideoOverlay.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/VideoTrackDescriptor.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20211101/VideoTrackDescriptor.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilter.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilter.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilterCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilterCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiAccessControl.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiAccessControl.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiSignatureHeaderAuthenticationKey.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiSignatureHeaderAuthenticationKey.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCapacity.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCapacity.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCurrentSku.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCurrentSku.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSku.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSku.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSkuInfo.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSkuInfo.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/Asset.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/Asset.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetContainerSas.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetContainerSas.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFileEncryptionMetadata.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFileEncryptionMetadata.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilter.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilter.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilterCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilterCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetStreamingLocator.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetStreamingLocator.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrack.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrack.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackOperationStatus.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackOperationStatus.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AsyncOperationResult.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AsyncOperationResult.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AudioTrack.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/AudioTrack.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CbcsDrmConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CbcsDrmConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CencDrmConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CencDrmConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ClearKeyEncryptionConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ClearKeyEncryptionConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCbcs.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCbcs.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCenc.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCenc.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicy.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicy.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyClearKeyConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyClearKeyConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayOfflineRentalConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayOfflineRentalConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOpenRestriction.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOpenRestriction.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOption.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOption.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentKeyLocation.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentKeyLocation.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyLicense.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyLicense.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyPlayRight.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyPlayRight.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestriction.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestriction.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestrictionTokenKey.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestrictionTokenKey.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRsaTokenKey.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRsaTokenKey.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicySymmetricTokenKey.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicySymmetricTokenKey.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenClaim.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenClaim.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenRestriction.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenRestriction.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownRestriction.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownRestriction.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyWidevineConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyWidevineConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyX509CertificateTokenKey.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyX509CertificateTokenKey.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CrossSiteAccessPolicies.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/CrossSiteAccessPolicies.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/DashSettings.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/DashSettings.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/DefaultKey.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/DefaultKey.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/EnabledProtocols.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/EnabledProtocols.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/EnvelopeEncryption.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/EnvelopeEncryption.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackPropertyCondition.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackPropertyCondition.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackSelection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackSelection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/FirstQuality.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/FirstQuality.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/Hls.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/Hls.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/HlsSettings.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/HlsSettings.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/IPAccessControl.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/IPAccessControl.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/IPRange.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/IPRange.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ListContainerSasInput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ListContainerSasInput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ListContentKeysResponse.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ListContentKeysResponse.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ListPathsResponse.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ListPathsResponse.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ListStreamingLocatorsResponse.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/ListStreamingLocatorsResponse.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEvent.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEvent.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventActionInput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventActionInput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEncoding.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEncoding.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEndpoint.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEndpoint.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputAccessControl.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputAccessControl.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputTrackSelection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputTrackSelection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventListResult.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventListResult.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventOutputTranscriptionTrack.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventOutputTranscriptionTrack.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreview.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreview.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreviewAccessControl.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreviewAccessControl.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventTranscription.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventTranscription.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutput.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutput.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputListResult.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputListResult.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/MediaFilterProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/MediaFilterProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/NoEncryption.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/NoEncryption.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/PresentationTimeRange.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/PresentationTimeRange.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StorageEncryptedAssetDecryptionData.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StorageEncryptedAssetDecryptionData.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpoint.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpoint.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointAccessControl.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointAccessControl.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointListResult.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointListResult.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointSkuInfoListResult.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointSkuInfoListResult.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEntityScaleUnit.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEntityScaleUnit.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocator.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocator.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorContentKey.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorContentKey.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPath.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPath.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicy.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicy.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyCollection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyCollection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKey.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKey.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKeys.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKeys.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyFairPlayConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyFairPlayConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyPlayReadyConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyPlayReadyConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyProperties.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyProperties.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyWidevineConfiguration.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyWidevineConfiguration.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/TextTrack.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/TextTrack.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/TrackBase.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/TrackBase.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/TrackPropertyCondition.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/TrackPropertyCondition.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/TrackSelection.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/TrackSelection.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/VideoTrack.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/Api20220801/VideoTrack.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/MediaServicesIdentity.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/MediaServicesIdentity.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/MediaServicesOperationResultsGetAcceptedResponseHeaders.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/MediaServicesOperationResultsGetAcceptedResponseHeaders.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/OperationResultsGetAcceptedResponseHeaders.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/OperationResultsGetAcceptedResponseHeaders.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/TracksDeleteAcceptedResponseHeaders.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/TracksDeleteAcceptedResponseHeaders.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/TracksUpdateTrackDataAcceptedResponseHeaders.cs create mode 100644 swaggerci/mediaservices/generated/api/Models/TracksUpdateTrackDataAcceptedResponseHeaders.json.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/AacAudioProfile.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/AccountEncryptionKeyType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/ActionType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/AnalysisResolution.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/AssetContainerPermission.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/AssetStorageEncryptionFormat.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/AsyncOperationStatus.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/AttributeFilter.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/AudioAnalysisMode.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/BlurType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/ChannelMapping.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/Complexity.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyFairPlayRentalAndLeaseKeyType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyContentType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyLicenseType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyUnknownOutputPassingOption.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyRestrictionTokenType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/CreatedByType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/DefaultAction.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/DeinterlaceMode.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/DeinterlaceParity.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/EncoderNamedPreset.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/EncryptionScheme.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/EntropyMode.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/FaceRedactorMode.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/FilterTrackPropertyCompareOperation.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/FilterTrackPropertyType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/H264Complexity.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/H264RateControlMode.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/H264VideoProfile.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/H265Complexity.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/H265VideoProfile.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/InsightsType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/InterleaveOutput.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/JobErrorCategory.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/JobErrorCode.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/JobRetry.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/JobState.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/LiveEventEncodingType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/LiveEventInputProtocol.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/LiveEventResourceState.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/LiveOutputResourceState.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/MetricAggregationType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/MetricUnit.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/OnErrorType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/Priority.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/PrivateEndpointServiceConnectionStatus.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/ProvisioningState.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/PublicNetworkAccess.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/Rotation.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/SecurityLevel.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/StorageAccountType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/StorageAuthentication.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/StreamOptionsFlag.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/StreamingEndpointResourceState.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/StreamingLocatorContentKeyType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/StreamingPolicyStreamingProtocol.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/StretchMode.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/TrackAttribute.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/TrackPropertyCompareOperation.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/TrackPropertyType.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/VideoSyncMode.cs create mode 100644 swaggerci/mediaservices/generated/api/Support/Visibility.cs create mode 100644 swaggerci/mediaservices/generated/runtime/CmdInfoHandler.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/ConversionException.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/IJsonConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/BinaryConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/BooleanConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/DateTimeConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/DecimalConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/DoubleConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/EnumConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/GuidConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/HashSet'1Converter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int16Converter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int32Converter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int64Converter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/JsonArrayConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/JsonObjectConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/SingleConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/StringConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/TimeSpanConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt16Converter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt32Converter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt64Converter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/Instances/UriConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/JsonConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/JsonConverterAttribute.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/JsonConverterFactory.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Conversions/StringLikeConverter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Customizations/IJsonSerializable.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Customizations/JsonArray.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Customizations/JsonBoolean.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Customizations/JsonNode.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Customizations/JsonNumber.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Customizations/JsonObject.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Customizations/JsonString.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Customizations/XNodeArray.cs create mode 100644 swaggerci/mediaservices/generated/runtime/EventData.cs create mode 100644 swaggerci/mediaservices/generated/runtime/EventListener.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Events.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Extensions.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Helpers/Extensions/TypeExtensions.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Helpers/Seperator.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Helpers/TypeDetails.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Helpers/XHelper.cs create mode 100644 swaggerci/mediaservices/generated/runtime/IAssociativeArray.cs create mode 100644 swaggerci/mediaservices/generated/runtime/IHeaderSerializable.cs create mode 100644 swaggerci/mediaservices/generated/runtime/ISendAsync.cs create mode 100644 swaggerci/mediaservices/generated/runtime/InfoAttribute.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Iso/IsoDate.cs create mode 100644 swaggerci/mediaservices/generated/runtime/JsonType.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Method.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Models/JsonMember.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Models/JsonModel.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Models/JsonModelCache.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/Collections/JsonArray.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/Collections/XImmutableArray.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/Collections/XList.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/Collections/XNodeArray.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/Collections/XSet.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/JsonBoolean.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/JsonDate.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/JsonNode.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/JsonNumber.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/JsonObject.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/JsonString.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/XBinary.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Nodes/XNull.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Parser/Exceptions/ParseException.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Parser/JsonParser.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Parser/JsonToken.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Parser/JsonTokenizer.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Parser/Location.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Parser/Readers/SourceReader.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Parser/TokenReader.cs create mode 100644 swaggerci/mediaservices/generated/runtime/PipelineMocking.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Response.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Serialization/JsonSerializer.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Serialization/PropertyTransformation.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Serialization/SerializationOptions.cs create mode 100644 swaggerci/mediaservices/generated/runtime/SerializationMode.cs create mode 100644 swaggerci/mediaservices/generated/runtime/UndeclaredResponseException.cs create mode 100644 swaggerci/mediaservices/generated/runtime/Writers/JsonWriter.cs create mode 100644 swaggerci/mediaservices/generated/runtime/delegates.cs create mode 100644 swaggerci/mediaservices/readme.md diff --git a/swaggerci/mediaservices/generated/api/AzureMediaServices.cs b/swaggerci/mediaservices/generated/api/AzureMediaServices.cs new file mode 100644 index 000000000000..cba87eed6110 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/AzureMediaServices.cs @@ -0,0 +1,20243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Low-level API implementation for the Azure Media Services service. + /// This Swagger was generated by the API Framework. + /// + public partial class AzureMediaServices + { + + /// Creates or updates an Account Filter in the Media Services account. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Account Filter name + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/accountFilters/" + + global::System.Uri.EscapeDataString(filterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Creates or updates an Account Filter in the Media Services account. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/accountFilters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var filterName = _match.Groups["filterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/accountFilters/" + + filterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AccountFilter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AccountFilter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Account Filter name + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(filterName),filterName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an Account Filter in the Media Services account. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Account Filter name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersDelete(string subscriptionId, string resourceGroupName, string accountName, string filterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/accountFilters/" + + global::System.Uri.EscapeDataString(filterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an Account Filter in the Media Services account. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/accountFilters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var filterName = _match.Groups["filterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/accountFilters/" + + filterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Account Filter name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(filterName),filterName); + } + } + + /// Get the details of an Account Filter in the Media Services account. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Account Filter name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersGet(string subscriptionId, string resourceGroupName, string accountName, string filterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/accountFilters/" + + global::System.Uri.EscapeDataString(filterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get the details of an Account Filter in the Media Services account. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/accountFilters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var filterName = _match.Groups["filterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/accountFilters/" + + filterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AccountFilter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Account Filter name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(filterName),filterName); + } + } + + /// List Account Filters in the Media Services account. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersList(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/accountFilters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Account Filters in the Media Services account. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/accountFilters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/accountFilters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AccountFilterCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersList_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + } + } + + /// Updates an existing Account Filter in the Media Services account. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Account Filter name + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersUpdate(string subscriptionId, string resourceGroupName, string accountName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/accountFilters/" + + global::System.Uri.EscapeDataString(filterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing Account Filter in the Media Services account. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AccountFiltersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/accountFilters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var filterName = _match.Groups["filterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/accountFilters/" + + filterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AccountFiltersUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AccountFilter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Account Filter name + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AccountFiltersUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(filterName),filterName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates or updates an Asset Filter associated with the specified Asset. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Filter name + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/assetFilters/" + + global::System.Uri.EscapeDataString(filterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Creates or updates an Asset Filter associated with the specified Asset. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/assetFilters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var filterName = _match.Groups["filterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/assetFilters/" + + filterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetFilter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetFilter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Filter name + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(filterName),filterName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an Asset Filter associated with the specified Asset. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Filter name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersDelete(string subscriptionId, string resourceGroupName, string accountName, string assetName, string filterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/assetFilters/" + + global::System.Uri.EscapeDataString(filterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an Asset Filter associated with the specified Asset. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/assetFilters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var filterName = _match.Groups["filterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/assetFilters/" + + filterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Filter name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(filterName),filterName); + } + } + + /// Get the details of an Asset Filter associated with the specified Asset. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Filter name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersGet(string subscriptionId, string resourceGroupName, string accountName, string assetName, string filterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/assetFilters/" + + global::System.Uri.EscapeDataString(filterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get the details of an Asset Filter associated with the specified Asset. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/assetFilters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var filterName = _match.Groups["filterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/assetFilters/" + + filterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetFilter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Filter name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(filterName),filterName); + } + } + + /// List Asset Filters associated with the specified Asset. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersList(string subscriptionId, string resourceGroupName, string accountName, string assetName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/assetFilters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Asset Filters associated with the specified Asset. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/assetFilters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/assetFilters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetFilterCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersList_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + } + } + + /// Updates an existing Asset Filter associated with the specified Asset. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Filter name + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersUpdate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/assetFilters/" + + global::System.Uri.EscapeDataString(filterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing Asset Filter associated with the specified Asset. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetFiltersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/assetFilters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var filterName = _match.Groups["filterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/assetFilters/" + + filterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetFiltersUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetFilter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Filter name + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetFiltersUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string filterName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(filterName),filterName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates or updates an Asset in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Creates or updates an Asset in the Media Services account + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.Asset.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.Asset.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an Asset in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsDelete(string subscriptionId, string resourceGroupName, string accountName, string assetName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an Asset in the Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + } + } + + /// Get the details of an Asset in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsGet(string subscriptionId, string resourceGroupName, string accountName, string assetName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsGetEncryptionKey(string subscriptionId, string resourceGroupName, string accountName, string assetName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/getEncryptionKey" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsGetEncryptionKey_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsGetEncryptionKeyViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/getEncryptionKey$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/getEncryptionKey'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/getEncryptionKey" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsGetEncryptionKey_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsGetEncryptionKey_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StorageEncryptedAssetDecryptionData.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsGetEncryptionKey_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + } + } + + /// Get the details of an Asset in the Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.Asset.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + } + } + + /// List Assets in the Media Services account with optional filtering and ordering + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsList(string subscriptionId, string resourceGroupName, string accountName, string Filter, int? Top, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures + /// are derived from the storage account keys. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsListContainerSas(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContainerSasInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/listContainerSas" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsListContainerSas_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures + /// are derived from the storage account keys. + /// + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsListContainerSasViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContainerSasInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/listContainerSas$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/listContainerSas'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/listContainerSas" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsListContainerSas_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsListContainerSas_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetContainerSas.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsListContainerSas_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContainerSasInput body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Lists Streaming Locators which are associated with this asset. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsListStreamingLocators(string subscriptionId, string resourceGroupName, string accountName, string assetName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/listStreamingLocators" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsListStreamingLocators_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists Streaming Locators which are associated with this asset. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsListStreamingLocatorsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/listStreamingLocators$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/listStreamingLocators'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/listStreamingLocators" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsListStreamingLocators_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsListStreamingLocators_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ListStreamingLocatorsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsListStreamingLocators_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + } + } + + /// List Assets in the Media Services account with optional filtering and ordering + /// + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsListViaIdentity(global::System.String viaIdentity, string Filter, int? Top, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsList_Validate(string subscriptionId, string resourceGroupName, string accountName, string Filter, int? Top, string Orderby, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(Orderby),Orderby); + } + } + + /// Updates an existing Asset in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsUpdate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing Asset in the Media Services account + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AssetsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AssetsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.Asset.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AssetsUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Create or update a Content Key Policy in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/contentKeyPolicies/" + + global::System.Uri.EscapeDataString(contentKeyPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Create or update a Content Key Policy in the Media Services account + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/contentKeyPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var contentKeyPolicyName = _match.Groups["contentKeyPolicyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/contentKeyPolicies/" + + contentKeyPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(contentKeyPolicyName),contentKeyPolicyName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a Content Key Policy in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesDelete(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/contentKeyPolicies/" + + global::System.Uri.EscapeDataString(contentKeyPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Content Key Policy in the Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/contentKeyPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var contentKeyPolicyName = _match.Groups["contentKeyPolicyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/contentKeyPolicies/" + + contentKeyPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(contentKeyPolicyName),contentKeyPolicyName); + } + } + + /// Get the details of a Content Key Policy in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesGet(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/contentKeyPolicies/" + + global::System.Uri.EscapeDataString(contentKeyPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a Content Key Policy including secret values + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesGetPolicyPropertiesWithSecrets(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/contentKeyPolicies/" + + global::System.Uri.EscapeDataString(contentKeyPolicyName) + + "/getPolicyPropertiesWithSecrets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesGetPolicyPropertiesWithSecrets_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a Content Key Policy including secret values + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesGetPolicyPropertiesWithSecretsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/contentKeyPolicies/(?[^/]+)/getPolicyPropertiesWithSecrets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}/getPolicyPropertiesWithSecrets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var contentKeyPolicyName = _match.Groups["contentKeyPolicyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/contentKeyPolicies/" + + contentKeyPolicyName + + "/getPolicyPropertiesWithSecrets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesGetPolicyPropertiesWithSecrets_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesGetPolicyPropertiesWithSecrets_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyProperties.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesGetPolicyPropertiesWithSecrets_Validate(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(contentKeyPolicyName),contentKeyPolicyName); + } + } + + /// Get the details of a Content Key Policy in the Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/contentKeyPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var contentKeyPolicyName = _match.Groups["contentKeyPolicyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/contentKeyPolicies/" + + contentKeyPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(contentKeyPolicyName),contentKeyPolicyName); + } + } + + /// Lists the Content Key Policies in the account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesList(string subscriptionId, string resourceGroupName, string accountName, string Filter, int? Top, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/contentKeyPolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the Content Key Policies in the account + /// + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesListViaIdentity(global::System.String viaIdentity, string Filter, int? Top, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/contentKeyPolicies$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/contentKeyPolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesList_Validate(string subscriptionId, string resourceGroupName, string accountName, string Filter, int? Top, string Orderby, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(Orderby),Orderby); + } + } + + /// Updates an existing Content Key Policy in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesUpdate(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/contentKeyPolicies/" + + global::System.Uri.EscapeDataString(contentKeyPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing Content Key Policy in the Media Services account + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ContentKeyPoliciesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/contentKeyPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var contentKeyPolicyName = _match.Groups["contentKeyPolicyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/contentKeyPolicies/" + + contentKeyPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ContentKeyPoliciesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Content Key Policy name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ContentKeyPoliciesUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string contentKeyPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(contentKeyPolicyName),contentKeyPolicyName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Cancel a Job. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsCancelJob(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "/jobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/cancelJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsCancelJob_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Cancel a Job. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsCancelJobViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)/jobs/(?[^/]+)/cancelJob$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}/cancelJob'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "/jobs/" + + jobName + + "/cancelJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsCancelJob_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsCancelJob_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsCancelJob_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + await eventListener.AssertNotNull(nameof(jobName),jobName); + } + } + + /// Creates a Job. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// The request parameters + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsCreate(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob body, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "/jobs/" + + global::System.Uri.EscapeDataString(jobName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsCreate_Call(request,onCreated,onDefault,eventListener,sender); + } + } + + /// Creates a Job. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob body, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "/jobs/" + + jobName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsCreate_Call(request,onCreated,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Job.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsCreate_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a Job. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsDelete(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "/jobs/" + + global::System.Uri.EscapeDataString(jobName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Job. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "/jobs/" + + jobName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + await eventListener.AssertNotNull(nameof(jobName),jobName); + } + } + + /// Gets a Job. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsGet(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "/jobs/" + + global::System.Uri.EscapeDataString(jobName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets a Job. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "/jobs/" + + jobName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Job.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + await eventListener.AssertNotNull(nameof(jobName),jobName); + } + } + + /// Lists all of the Jobs for the Transform. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// Restricts the set of items returned. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsList(string subscriptionId, string resourceGroupName, string accountName, string transformName, string Filter, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "/jobs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the Jobs for the Transform. + /// + /// Restricts the set of items returned. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsListViaIdentity(global::System.String viaIdentity, string Filter, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)/jobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "/jobs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// Restricts the set of items returned. + /// Specifies the key by which the result collection should be ordered. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsList_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, string Filter, string Orderby, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(Orderby),Orderby); + } + } + + /// + /// Update is only supported for description and priority. Updating Priority will take effect when the Job state is Queued + /// or Scheduled and depending on the timing the priority update may be ignored. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsUpdate(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "/jobs/" + + global::System.Uri.EscapeDataString(jobName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update is only supported for description and priority. Updating Priority will take effect when the Job state is Queued + /// or Scheduled and depending on the timing the priority update may be ignored. + /// + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "/jobs/" + + jobName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Job.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The Job name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// A live event is in StandBy state after allocation completes, and is ready to start. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsAllocate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/allocate" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsAllocate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// A live event is in StandBy state after allocation completes, and is ready to start. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsAllocateViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/allocate$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/allocate'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/allocate" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsAllocate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsAllocate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsAllocate_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Get a live event operation status. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The ID of an ongoing async operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsAsyncOperation(string subscriptionId, string resourceGroupName, string accountName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEventOperations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsAsyncOperation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a live event operation status. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsAsyncOperationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEventOperations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEventOperations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEventOperations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsAsyncOperation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsAsyncOperation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AsyncOperationResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The ID of an ongoing async operation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsAsyncOperation_Validate(string subscriptionId, string resourceGroupName, string accountName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + await eventListener.AssertMinimumLength(nameof(operationId),operationId,1); + } + } + + /// Creates a new live event. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The flag indicates if the resource should be automatically started on creation. + /// Live event properties needed for creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsCreate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, bool? autoStart, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == autoStart ? global::System.String.Empty : "autoStart=" + global::System.Uri.EscapeDataString(autoStart.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new live event. + /// + /// The flag indicates if the resource should be automatically started on creation. + /// Live event properties needed for creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsCreateViaIdentity(global::System.String viaIdentity, bool? autoStart, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == autoStart ? global::System.String.Empty : "autoStart=" + global::System.Uri.EscapeDataString(autoStart.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEvent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The flag indicates if the resource should be automatically started on creation. + /// Live event properties needed for creation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsCreate_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, bool? autoStart, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a live event. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsDelete(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a live event. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Gets properties of a live event. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsGet(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets properties of a live event. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEvent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Lists all the live events in the account. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsList(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all the live events in the account. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsList_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + } + } + + /// Get a live event operation status. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The ID of an ongoing async operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsOperationLocation(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/operationLocations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsOperationLocation_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Get a live event operation status. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsOperationLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/operationLocations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/operationLocations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/operationLocations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsOperationLocation_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsOperationLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEvent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The ID of an ongoing async operation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsOperationLocation_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(operationId),operationId); + await eventListener.AssertMinimumLength(nameof(operationId),operationId,1); + } + } + + /// + /// Resets an existing live event. All live outputs for the live event are deleted and the live event is stopped and will + /// be started again. All assets used by the live outputs and streaming locators created on these assets are unaffected. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsReset(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/reset" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsReset_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Resets an existing live event. All live outputs for the live event are deleted and the live event is stopped and will + /// be started again. All assets used by the live outputs and streaming locators created on these assets are unaffected. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsResetViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/reset$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/reset'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/reset" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsReset_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsReset_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsReset_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// + /// A live event in Stopped or StandBy state will be in Running state after the start operation completes. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsStart(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/start" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsStart_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// A live event in Stopped or StandBy state will be in Running state after the start operation completes. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsStartViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/start$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/start'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/start" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsStart_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsStart_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsStart_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Stops a running live event. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// LiveEvent stop parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsStop(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventActionInput body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/stop" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsStop_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Stops a running live event. + /// + /// LiveEvent stop parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsStopViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventActionInput body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/stop$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/stop'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/stop" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsStop_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsStop_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// LiveEvent stop parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsStop_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventActionInput body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Updates settings on an existing live event. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// Live event properties needed for patch. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsUpdate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates settings on an existing live event. + /// + /// Live event properties needed for patch. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveEventsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveEventsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEvent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// Live event properties needed for patch. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveEventsUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a Live Output operation status. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The ID of an ongoing async operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsAsyncOperation(string subscriptionId, string resourceGroupName, string accountName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveOutputOperations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsAsyncOperation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a Live Output operation status. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsAsyncOperationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveOutputOperations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveOutputOperations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveOutputOperations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsAsyncOperation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsAsyncOperation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AsyncOperationResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The ID of an ongoing async operation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsAsyncOperation_Validate(string subscriptionId, string resourceGroupName, string accountName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + await eventListener.AssertMinimumLength(nameof(operationId),operationId,1); + } + } + + /// Creates a new live output. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The name of the live output. + /// Live Output properties needed for creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsCreate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string liveOutputName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/liveOutputs/" + + global::System.Uri.EscapeDataString(liveOutputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new live output. + /// + /// Live Output properties needed for creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/liveOutputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs/{liveOutputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + var liveOutputName = _match.Groups["liveOutputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/liveOutputs/" + + liveOutputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The name of the live output. + /// Live Output properties needed for creation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsCreate_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string liveOutputName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(liveOutputName),liveOutputName); + await eventListener.AssertMinimumLength(nameof(liveOutputName),liveOutputName,1); + await eventListener.AssertMaximumLength(nameof(liveOutputName),liveOutputName,256); + await eventListener.AssertRegEx(nameof(liveOutputName),liveOutputName,@"^([a-zA-Z0-9])+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Deletes a live output. Deleting a live output does not delete the asset the live output is writing to. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The name of the live output. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsDelete(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string liveOutputName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/liveOutputs/" + + global::System.Uri.EscapeDataString(liveOutputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Deletes a live output. Deleting a live output does not delete the asset the live output is writing to. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/liveOutputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs/{liveOutputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + var liveOutputName = _match.Groups["liveOutputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/liveOutputs/" + + liveOutputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The name of the live output. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string liveOutputName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(liveOutputName),liveOutputName); + await eventListener.AssertMinimumLength(nameof(liveOutputName),liveOutputName,1); + await eventListener.AssertMaximumLength(nameof(liveOutputName),liveOutputName,256); + await eventListener.AssertRegEx(nameof(liveOutputName),liveOutputName,@"^([a-zA-Z0-9])+(-*[a-zA-Z0-9])*$"); + } + } + + /// Gets a live output. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The name of the live output. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsGet(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string liveOutputName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/liveOutputs/" + + global::System.Uri.EscapeDataString(liveOutputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets a live output. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/liveOutputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs/{liveOutputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + var liveOutputName = _match.Groups["liveOutputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/liveOutputs/" + + liveOutputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The name of the live output. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string liveOutputName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(liveOutputName),liveOutputName); + await eventListener.AssertMinimumLength(nameof(liveOutputName),liveOutputName,1); + await eventListener.AssertMaximumLength(nameof(liveOutputName),liveOutputName,256); + await eventListener.AssertRegEx(nameof(liveOutputName),liveOutputName,@"^([a-zA-Z0-9])+(-*[a-zA-Z0-9])*$"); + } + } + + /// Lists the live outputs of a live event. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsList(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/liveOutputs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the live outputs of a live event. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/liveOutputs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/liveOutputs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveOutputListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsList_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Get a Live Output operation status. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The name of the live output. + /// The ID of an ongoing async operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsOperationLocation(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string liveOutputName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/liveEvents/" + + global::System.Uri.EscapeDataString(liveEventName) + + "/liveOutputs/" + + global::System.Uri.EscapeDataString(liveOutputName) + + "/operationLocations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsOperationLocation_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Get a Live Output operation status. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LiveOutputsOperationLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/liveEvents/(?[^/]+)/liveOutputs/(?[^/]+)/operationLocations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs/{liveOutputName}/operationLocations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var liveEventName = _match.Groups["liveEventName"].Value; + var liveOutputName = _match.Groups["liveOutputName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/liveEvents/" + + liveEventName + + "/liveOutputs/" + + liveOutputName + + "/operationLocations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LiveOutputsOperationLocation_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsOperationLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the live event, maximum length is 32. + /// The name of the live output. + /// The ID of an ongoing async operation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LiveOutputsOperationLocation_Validate(string subscriptionId, string resourceGroupName, string accountName, string liveEventName, string liveOutputName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(liveEventName),liveEventName); + await eventListener.AssertMinimumLength(nameof(liveEventName),liveEventName,1); + await eventListener.AssertMaximumLength(nameof(liveEventName),liveEventName,32); + await eventListener.AssertRegEx(nameof(liveEventName),liveEventName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(liveOutputName),liveOutputName); + await eventListener.AssertMinimumLength(nameof(liveOutputName),liveOutputName,1); + await eventListener.AssertMaximumLength(nameof(liveOutputName),liveOutputName,256); + await eventListener.AssertRegEx(nameof(liveOutputName),liveOutputName,@"^([a-zA-Z0-9])+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(operationId),operationId); + await eventListener.AssertMinimumLength(nameof(operationId),operationId,1); + } + } + + /// Checks whether the Media Service resource name is available. + /// The unique identifier for a Microsoft Azure subscription. + /// Location name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LocationsCheckNameAvailability(string subscriptionId, string locationName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICheckNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Media/locations/" + + global::System.Uri.EscapeDataString(locationName) + + "/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LocationsCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Checks whether the Media Service resource name is available. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LocationsCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICheckNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Media/locations/(?[^/]+)/checkNameAvailability$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var locationName = _match.Groups["locationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Media/locations/" + + locationName + + "/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LocationsCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LocationsCheckNameAvailability_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.EntityNameAvailabilityCheckOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// Location name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LocationsCheckNameAvailability_Validate(string subscriptionId, string locationName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICheckNameAvailabilityInput body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(locationName),locationName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get media service operation result. + /// The unique identifier for a Microsoft Azure subscription. + /// Location name. + /// Operation Id. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaServicesOperationResultsGet(string subscriptionId, string locationName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Media/locations/" + + global::System.Uri.EscapeDataString(locationName) + + "/mediaServicesOperationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaServicesOperationResultsGet_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Get media service operation result. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaServicesOperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Media/locations/(?[^/]+)/mediaServicesOperationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/mediaServicesOperationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var locationName = _match.Groups["locationName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Media/locations/" + + locationName + + "/mediaServicesOperationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaServicesOperationResultsGet_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaServicesOperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaService.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' /home/cloudtest/.autorest/@autorest_powershell@3.0.494/node_modules/@autorest/powershell/dist/llcsharp/schema/object.js*/); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// Location name. + /// Operation Id. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaServicesOperationResultsGet_Validate(string subscriptionId, string locationName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(locationName),locationName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// Get media service operation status. + /// The unique identifier for a Microsoft Azure subscription. + /// Location name. + /// Operation ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaServicesOperationStatusesGet(string subscriptionId, string locationName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Media/locations/" + + global::System.Uri.EscapeDataString(locationName) + + "/mediaServicesOperationStatuses/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaServicesOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get media service operation status. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaServicesOperationStatusesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Media/locations/(?[^/]+)/mediaServicesOperationStatuses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/mediaServicesOperationStatuses/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var locationName = _match.Groups["locationName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Media/locations/" + + locationName + + "/mediaServicesOperationStatuses/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaServicesOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaServicesOperationStatusesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceOperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// Location name. + /// Operation ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaServicesOperationStatusesGet_Validate(string subscriptionId, string locationName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(locationName),locationName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// Creates or updates a Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates or updates a Media Services account + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaService.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesDelete(string subscriptionId, string resourceGroupName, string accountName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + } + } + + /// Get the details of a Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesGet(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get the details of a Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaService.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesGet_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + } + } + + /// List Media Services accounts in the resource group + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesList(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Media Services accounts in the subscription. + /// The unique identifier for a Microsoft Azure subscription. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Media/mediaservices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Media Services accounts in the subscription. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Media/mediaservices$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Media/mediaservices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// List all the media edge policies associated with the Media Services account. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesListEdgePolicies(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IListEdgePoliciesInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/listEdgePolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesListEdgePolicies_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List all the media edge policies associated with the Media Services account. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesListEdgePoliciesViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IListEdgePoliciesInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/listEdgePolicies$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/listEdgePolicies'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/listEdgePolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesListEdgePolicies_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesListEdgePolicies_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.EdgePolicies.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesListEdgePolicies_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IListEdgePoliciesInput body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// List Media Services accounts in the resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesList_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + } + } + + /// + /// Synchronizes storage account keys for a storage account associated with the Media Service account. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesSyncStorageKeys(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISyncStorageKeysInput body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/syncStorageKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesSyncStorageKeys_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Synchronizes storage account keys for a storage account associated with the Media Service account. + /// + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesSyncStorageKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISyncStorageKeysInput body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/syncStorageKeys$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/syncStorageKeys'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/syncStorageKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesSyncStorageKeys_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesSyncStorageKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesSyncStorageKeys_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISyncStorageKeysInput body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Updates an existing Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The request parameters + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesUpdate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesUpdate_Call(request,onDefault,eventListener,sender); + } + } + + /// Updates an existing Media Services account + /// + /// The request parameters + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MediaservicesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MediaservicesUpdate_Call(request,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MediaservicesUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get asset track operation result. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// Operation Id. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationResultsGet(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/tracks/" + + global::System.Uri.EscapeDataString(trackName) + + "/operationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Get asset track operation result. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/tracks/(?[^/]+)/operationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}/operationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var trackName = _match.Groups["trackName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/tracks/" + + trackName + + "/operationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetTrack.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' /home/cloudtest/.autorest/@autorest_powershell@3.0.494/node_modules/@autorest/powershell/dist/llcsharp/schema/object.js*/); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// Operation Id. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationResultsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(trackName),trackName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// Get asset track operation status. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// Operation Id. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationStatusesGet(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/tracks/" + + global::System.Uri.EscapeDataString(trackName) + + "/operationStatuses/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get asset track operation status. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationStatusesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/tracks/(?[^/]+)/operationStatuses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}/operationStatuses/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var trackName = _match.Groups["trackName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/tracks/" + + trackName + + "/operationStatuses/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationStatusesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetTrackOperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// Operation Id. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationStatusesGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(trackName),trackName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// Lists all the Media Services operations. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Media/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all the Media Services operations. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Media/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Media/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Media/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.OperationCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// Update an existing private endpoint connection. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string name, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(name) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update an existing private endpoint connection. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/privateEndpointConnections/{name}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var name = _match.Groups["name"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/privateEndpointConnections/" + + name + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string name, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(name),name); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a private endpoint connection. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string accountName, string name, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(name) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a private endpoint connection. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/privateEndpointConnections/{name}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var name = _match.Groups["name"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/privateEndpointConnections/" + + name + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string name, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(name),name); + } + } + + /// Get the details of a private endpoint connection. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string accountName, string name, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(name) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get the details of a private endpoint connection. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/privateEndpointConnections/{name}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var name = _match.Groups["name"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/privateEndpointConnections/" + + name + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string name, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(name),name); + } + } + + /// List all private endpoint connections. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/privateEndpointConnections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List all private endpoint connections. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/privateEndpointConnections'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/privateEndpointConnections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + } + } + + /// Get details of a group ID. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateLinkResourcesGet(string subscriptionId, string resourceGroupName, string accountName, string name, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/privateLinkResources/" + + global::System.Uri.EscapeDataString(name) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateLinkResourcesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get details of a group ID. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateLinkResourcesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/privateLinkResources/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/privateLinkResources/{name}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var name = _match.Groups["name"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/privateLinkResources/" + + name + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateLinkResourcesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateLinkResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string name, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(name),name); + } + } + + /// List supported group IDs. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateLinkResourcesList(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/privateLinkResources" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateLinkResourcesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List supported group IDs. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateLinkResourcesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/privateLinkResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/privateLinkResources'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/privateLinkResources" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateLinkResourcesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateLinkResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesList_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + } + } + + /// Get a streaming endpoint operation status. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The ID of an ongoing async operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsAsyncOperation(string subscriptionId, string resourceGroupName, string accountName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpointOperations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsAsyncOperation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a streaming endpoint operation status. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsAsyncOperationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpointOperations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpointOperations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpointOperations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsAsyncOperation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsAsyncOperation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AsyncOperationResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The ID of an ongoing async operation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsAsyncOperation_Validate(string subscriptionId, string resourceGroupName, string accountName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + await eventListener.AssertMinimumLength(nameof(operationId),operationId,1); + } + } + + /// Creates a streaming endpoint. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// The flag indicates if the resource should be automatically started on creation. + /// Streaming endpoint properties needed for creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsCreate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, bool? autoStart, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints/" + + global::System.Uri.EscapeDataString(streamingEndpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == autoStart ? global::System.String.Empty : "autoStart=" + global::System.Uri.EscapeDataString(autoStart.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a streaming endpoint. + /// + /// The flag indicates if the resource should be automatically started on creation. + /// Streaming endpoint properties needed for creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsCreateViaIdentity(global::System.String viaIdentity, bool? autoStart, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingEndpointName = _match.Groups["streamingEndpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints/" + + streamingEndpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == autoStart ? global::System.String.Empty : "autoStart=" + global::System.Uri.EscapeDataString(autoStart.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// The flag indicates if the resource should be automatically started on creation. + /// Streaming endpoint properties needed for creation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsCreate_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, bool? autoStart, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingEndpointName),streamingEndpointName); + await eventListener.AssertMinimumLength(nameof(streamingEndpointName),streamingEndpointName,1); + await eventListener.AssertMaximumLength(nameof(streamingEndpointName),streamingEndpointName,24); + await eventListener.AssertRegEx(nameof(streamingEndpointName),streamingEndpointName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a streaming endpoint. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsDelete(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints/" + + global::System.Uri.EscapeDataString(streamingEndpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a streaming endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingEndpointName = _match.Groups["streamingEndpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints/" + + streamingEndpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingEndpointName),streamingEndpointName); + await eventListener.AssertMinimumLength(nameof(streamingEndpointName),streamingEndpointName,1); + await eventListener.AssertMaximumLength(nameof(streamingEndpointName),streamingEndpointName,24); + await eventListener.AssertRegEx(nameof(streamingEndpointName),streamingEndpointName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Gets a streaming endpoint. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsGet(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints/" + + global::System.Uri.EscapeDataString(streamingEndpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets a streaming endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingEndpointName = _match.Groups["streamingEndpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints/" + + streamingEndpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingEndpointName),streamingEndpointName); + await eventListener.AssertMinimumLength(nameof(streamingEndpointName),streamingEndpointName,1); + await eventListener.AssertMaximumLength(nameof(streamingEndpointName),streamingEndpointName,24); + await eventListener.AssertRegEx(nameof(streamingEndpointName),streamingEndpointName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Lists the streaming endpoints in the account. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsList(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the streaming endpoints in the account. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpointListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsList_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + } + } + + /// Get a streaming endpoint operation status. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// The ID of an ongoing async operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsOperationLocation(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints/" + + global::System.Uri.EscapeDataString(streamingEndpointName) + + "/operationLocations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsOperationLocation_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Get a streaming endpoint operation status. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsOperationLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints/(?[^/]+)/operationLocations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/operationLocations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingEndpointName = _match.Groups["streamingEndpointName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints/" + + streamingEndpointName + + "/operationLocations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsOperationLocation_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsOperationLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// The ID of an ongoing async operation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsOperationLocation_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingEndpointName),streamingEndpointName); + await eventListener.AssertMinimumLength(nameof(streamingEndpointName),streamingEndpointName,1); + await eventListener.AssertMaximumLength(nameof(streamingEndpointName),streamingEndpointName,24); + await eventListener.AssertRegEx(nameof(streamingEndpointName),streamingEndpointName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(operationId),operationId); + await eventListener.AssertMinimumLength(nameof(operationId),operationId,1); + } + } + + /// Scales an existing streaming endpoint. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// Streaming endpoint scale parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsScale(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEntityScaleUnit body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints/" + + global::System.Uri.EscapeDataString(streamingEndpointName) + + "/scale" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsScale_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Scales an existing streaming endpoint. + /// + /// Streaming endpoint scale parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsScaleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEntityScaleUnit body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints/(?[^/]+)/scale$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/scale'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingEndpointName = _match.Groups["streamingEndpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints/" + + streamingEndpointName + + "/scale" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsScale_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsScale_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// Streaming endpoint scale parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsScale_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEntityScaleUnit body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingEndpointName),streamingEndpointName); + await eventListener.AssertMinimumLength(nameof(streamingEndpointName),streamingEndpointName,1); + await eventListener.AssertMaximumLength(nameof(streamingEndpointName),streamingEndpointName,24); + await eventListener.AssertRegEx(nameof(streamingEndpointName),streamingEndpointName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// List streaming endpoint supported skus. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsSkus(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints/" + + global::System.Uri.EscapeDataString(streamingEndpointName) + + "/skus" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsSkus_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List streaming endpoint supported skus. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsSkusViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints/(?[^/]+)/skus$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/skus'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingEndpointName = _match.Groups["streamingEndpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints/" + + streamingEndpointName + + "/skus" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsSkus_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsSkus_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpointSkuInfoListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsSkus_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingEndpointName),streamingEndpointName); + await eventListener.AssertMinimumLength(nameof(streamingEndpointName),streamingEndpointName,1); + await eventListener.AssertMaximumLength(nameof(streamingEndpointName),streamingEndpointName,24); + await eventListener.AssertRegEx(nameof(streamingEndpointName),streamingEndpointName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Starts an existing streaming endpoint. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsStart(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints/" + + global::System.Uri.EscapeDataString(streamingEndpointName) + + "/start" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsStart_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Starts an existing streaming endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsStartViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints/(?[^/]+)/start$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/start'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingEndpointName = _match.Groups["streamingEndpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints/" + + streamingEndpointName + + "/start" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsStart_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsStart_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsStart_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingEndpointName),streamingEndpointName); + await eventListener.AssertMinimumLength(nameof(streamingEndpointName),streamingEndpointName,1); + await eventListener.AssertMaximumLength(nameof(streamingEndpointName),streamingEndpointName,24); + await eventListener.AssertRegEx(nameof(streamingEndpointName),streamingEndpointName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Stops an existing streaming endpoint. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsStop(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints/" + + global::System.Uri.EscapeDataString(streamingEndpointName) + + "/stop" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsStop_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Stops an existing streaming endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsStopViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints/(?[^/]+)/stop$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/stop'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingEndpointName = _match.Groups["streamingEndpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints/" + + streamingEndpointName + + "/stop" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsStop_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsStop_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsStop_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingEndpointName),streamingEndpointName); + await eventListener.AssertMinimumLength(nameof(streamingEndpointName),streamingEndpointName,1); + await eventListener.AssertMaximumLength(nameof(streamingEndpointName),streamingEndpointName,24); + await eventListener.AssertRegEx(nameof(streamingEndpointName),streamingEndpointName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + } + } + + /// Updates a existing streaming endpoint. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// Streaming endpoint properties needed for creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsUpdate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaservices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingEndpoints/" + + global::System.Uri.EscapeDataString(streamingEndpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates a existing streaming endpoint. + /// + /// Streaming endpoint properties needed for creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingEndpointsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaservices/(?[^/]+)/streamingEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingEndpointName = _match.Groups["streamingEndpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaservices/" + + accountName + + "/streamingEndpoints/" + + streamingEndpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingEndpointsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The name of the streaming endpoint, maximum length is 24. + /// Streaming endpoint properties needed for creation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingEndpointsUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingEndpointName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingEndpointName),streamingEndpointName); + await eventListener.AssertMinimumLength(nameof(streamingEndpointName),streamingEndpointName,1); + await eventListener.AssertMaximumLength(nameof(streamingEndpointName),streamingEndpointName,24); + await eventListener.AssertRegEx(nameof(streamingEndpointName),streamingEndpointName,@"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Create a Streaming Locator in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// The request parameters + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsCreate(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator body, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingLocators/" + + global::System.Uri.EscapeDataString(streamingLocatorName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsCreate_Call(request,onCreated,onDefault,eventListener,sender); + } + } + + /// Create a Streaming Locator in the Media Services account + /// + /// The request parameters + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator body, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingLocators/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingLocatorName = _match.Groups["streamingLocatorName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingLocators/" + + streamingLocatorName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsCreate_Call(request,onCreated,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingLocator.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsCreate_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingLocatorName),streamingLocatorName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a Streaming Locator in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsDelete(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingLocators/" + + global::System.Uri.EscapeDataString(streamingLocatorName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Streaming Locator in the Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingLocators/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingLocatorName = _match.Groups["streamingLocatorName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingLocators/" + + streamingLocatorName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingLocatorName),streamingLocatorName); + } + } + + /// Get the details of a Streaming Locator in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsGet(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingLocators/" + + global::System.Uri.EscapeDataString(streamingLocatorName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get the details of a Streaming Locator in the Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingLocators/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingLocatorName = _match.Groups["streamingLocatorName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingLocators/" + + streamingLocatorName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingLocator.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingLocatorName),streamingLocatorName); + } + } + + /// Lists the Streaming Locators in the account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsList(string subscriptionId, string resourceGroupName, string accountName, string Filter, int? Top, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingLocators" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Content Keys used by this Streaming Locator + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsListContentKeys(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingLocators/" + + global::System.Uri.EscapeDataString(streamingLocatorName) + + "/listContentKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsListContentKeys_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Content Keys used by this Streaming Locator + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsListContentKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingLocators/(?[^/]+)/listContentKeys$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listContentKeys'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingLocatorName = _match.Groups["streamingLocatorName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingLocators/" + + streamingLocatorName + + "/listContentKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsListContentKeys_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsListContentKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ListContentKeysResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsListContentKeys_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingLocatorName),streamingLocatorName); + } + } + + /// List Paths supported by this Streaming Locator + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsListPaths(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingLocators/" + + global::System.Uri.EscapeDataString(streamingLocatorName) + + "/listPaths" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsListPaths_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Paths supported by this Streaming Locator + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsListPathsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingLocators/(?[^/]+)/listPaths$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listPaths'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingLocatorName = _match.Groups["streamingLocatorName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingLocators/" + + streamingLocatorName + + "/listPaths" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsListPaths_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsListPaths_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ListPathsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Locator name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsListPaths_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingLocatorName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingLocatorName),streamingLocatorName); + } + } + + /// Lists the Streaming Locators in the account + /// + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingLocatorsListViaIdentity(global::System.String viaIdentity, string Filter, int? Top, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingLocators$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingLocators" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingLocatorsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingLocatorCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingLocatorsList_Validate(string subscriptionId, string resourceGroupName, string accountName, string Filter, int? Top, string Orderby, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(Orderby),Orderby); + } + } + + /// Create a Streaming Policy in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Policy name. + /// The request parameters + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingPoliciesCreate(string subscriptionId, string resourceGroupName, string accountName, string streamingPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingPolicies/" + + global::System.Uri.EscapeDataString(streamingPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingPoliciesCreate_Call(request,onCreated,onDefault,eventListener,sender); + } + } + + /// Create a Streaming Policy in the Media Services account + /// + /// The request parameters + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingPoliciesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingPolicyName = _match.Groups["streamingPolicyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingPolicies/" + + streamingPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingPoliciesCreate_Call(request,onCreated,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingPoliciesCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Policy name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingPoliciesCreate_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingPolicyName),streamingPolicyName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a Streaming Policy in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Policy name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingPoliciesDelete(string subscriptionId, string resourceGroupName, string accountName, string streamingPolicyName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingPolicies/" + + global::System.Uri.EscapeDataString(streamingPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Streaming Policy in the Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingPoliciesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingPolicyName = _match.Groups["streamingPolicyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingPolicies/" + + streamingPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingPoliciesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Policy name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingPoliciesDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingPolicyName),streamingPolicyName); + } + } + + /// Get the details of a Streaming Policy in the Media Services account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Policy name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingPoliciesGet(string subscriptionId, string resourceGroupName, string accountName, string streamingPolicyName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingPolicies/" + + global::System.Uri.EscapeDataString(streamingPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get the details of a Streaming Policy in the Media Services account + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingPoliciesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var streamingPolicyName = _match.Groups["streamingPolicyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingPolicies/" + + streamingPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingPoliciesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Streaming Policy name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingPoliciesGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string streamingPolicyName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(streamingPolicyName),streamingPolicyName); + } + } + + /// Lists the Streaming Policies in the account + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingPoliciesList(string subscriptionId, string resourceGroupName, string accountName, string Filter, int? Top, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/streamingPolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingPoliciesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the Streaming Policies in the account + /// + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StreamingPoliciesListViaIdentity(global::System.String viaIdentity, string Filter, int? Top, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/streamingPolicies$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/streamingPolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingPoliciesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingPoliciesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies a non-negative integer n that limits the number of items returned from a collection. The service + /// returns the number of available items up to but not greater than the specified value n. + /// Specifies the key by which the result collection should be ordered. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StreamingPoliciesList_Validate(string subscriptionId, string resourceGroupName, string accountName, string Filter, int? Top, string Orderby, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(Orderby),Orderby); + } + } + + /// Create or update a Track in the asset + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/tracks/" + + global::System.Uri.EscapeDataString(trackName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Create or update a Track in the asset + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/tracks/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var trackName = _match.Groups["trackName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/tracks/" + + trackName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetTrack.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(trackName),trackName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a Track in the asset + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksDelete(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/tracks/" + + global::System.Uri.EscapeDataString(trackName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Track in the asset + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/tracks/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var trackName = _match.Groups["trackName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/tracks/" + + trackName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(trackName),trackName); + } + } + + /// Get the details of a Track in the Asset + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksGet(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/tracks/" + + global::System.Uri.EscapeDataString(trackName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get the details of a Track in the Asset + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/tracks/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var trackName = _match.Groups["trackName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/tracks/" + + trackName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetTrack.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(trackName),trackName); + } + } + + /// Lists the Tracks in the asset + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksList(string subscriptionId, string resourceGroupName, string accountName, string assetName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/tracks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the Tracks in the asset + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/tracks$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/tracks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetTrackCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksList_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + } + } + + /// Updates an existing Track in the asset + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// The request parameters + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksUpdate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/tracks/" + + global::System.Uri.EscapeDataString(trackName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksUpdate_Call(request,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksUpdateTrackData(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/assets/" + + global::System.Uri.EscapeDataString(assetName) + + "/tracks/" + + global::System.Uri.EscapeDataString(trackName) + + "/updateTrackData" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksUpdateTrackData_Call(request,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksUpdateTrackDataViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/tracks/(?[^/]+)/updateTrackData$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}/updateTrackData'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var trackName = _match.Groups["trackName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/tracks/" + + trackName + + "/updateTrackData" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksUpdateTrackData_Call(request,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksUpdateTrackData_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksUpdateTrackData_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(trackName),trackName); + } + } + + /// Updates an existing Track in the asset + /// + /// The request parameters + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TracksUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-08-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/assets/(?[^/]+)/tracks/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var assetName = _match.Groups["assetName"].Value; + var trackName = _match.Groups["trackName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/assets/" + + assetName + + "/tracks/" + + trackName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TracksUpdate_Call(request,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Asset name. + /// The Asset Track name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TracksUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string assetName, string trackName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(assetName),assetName); + await eventListener.AssertNotNull(nameof(trackName),trackName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates or updates a new Transform. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string transformName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Creates or updates a new Transform. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Transform.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Transform.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a Transform. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsDelete(string subscriptionId, string resourceGroupName, string accountName, string transformName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Transform. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + } + } + + /// Gets a Transform. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsGet(string subscriptionId, string resourceGroupName, string accountName, string transformName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets a Transform. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Transform.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + } + } + + /// Lists the Transforms in the account. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsList(string subscriptionId, string resourceGroupName, string accountName, string Filter, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the Transforms in the account. + /// + /// Restricts the set of items returned. + /// Specifies the key by which the result collection should be ordered. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsListViaIdentity(global::System.String viaIdentity, string Filter, string Orderby, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TransformCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// Restricts the set of items returned. + /// Specifies the key by which the result collection should be ordered. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsList_Validate(string subscriptionId, string resourceGroupName, string accountName, string Filter, string Orderby, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(Orderby),Orderby); + } + } + + /// Updates a Transform. + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsUpdate(string subscriptionId, string resourceGroupName, string accountName, string transformName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Media/mediaServices/" + + global::System.Uri.EscapeDataString(accountName) + + "/transforms/" + + global::System.Uri.EscapeDataString(transformName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates a Transform. + /// + /// The request parameters + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TransformsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Media/mediaServices/(?[^/]+)/transforms/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var transformName = _match.Groups["transformName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Media/mediaServices/" + + accountName + + "/transforms/" + + transformName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Transform.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The unique identifier for a Microsoft Azure subscription. + /// The name of the resource group within the Azure subscription. + /// The Media Services account name. + /// The Transform name. + /// The request parameters + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TransformsUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string transformName, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform body, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertNotNull(nameof(transformName),transformName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Any.cs b/swaggerci/mediaservices/generated/api/Models/Any.cs new file mode 100644 index 000000000000..25b2a4a5fa55 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Any object + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Any object + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + + } + /// Any object + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Any.json.cs b/swaggerci/mediaservices/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..daf00b0bbde0 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Any.json.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Any object + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/ErrorAdditionalInfo.cs b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..999b693f2e5e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorAdditionalInfo.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny _info; + + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Any()); } + + /// Internal Acessors for Info + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Any()); set { {_info = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type; + + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ErrorAdditionalInfo() + { + + } + } + /// The resource management error additional info. + public partial interface IErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The additional info.", + SerializedName = @"info", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny Info { get; } + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The additional info type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The resource management error additional info. + internal partial interface IErrorAdditionalInfoInternal + + { + /// The additional info. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IAny Info { get; set; } + /// The additional info type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs new file mode 100644 index 000000000000..f1bef73fa5b5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Any.FromJson(__jsonInfo) : Info;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/ErrorDetail.cs b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorDetail.cs new file mode 100644 index 000000000000..c71a848c00dc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorDetail.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// The error detail. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/ErrorDetail.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorDetail.json.cs new file mode 100644 index 000000000000..b1dfee31ac54 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorDetail.json.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/ErrorResponse.cs b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorResponse.cs new file mode 100644 index 000000000000..007216a25778 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorResponse.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + internal partial interface IErrorResponseInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/ErrorResponse.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorResponse.json.cs new file mode 100644 index 000000000000..02c0b6637cff --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/ErrorResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpoint.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpoint.cs new file mode 100644 index 000000000000..495ac4eef56f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpoint.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Private Endpoint resource. + public partial class PrivateEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointInternal + { + + /// Backing field for property. + private string _id; + + /// The ARM identifier for Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointInternal.Id { get => this._id; set { {_id = value;} } } + + /// Creates an new instance. + public PrivateEndpoint() + { + + } + } + /// The Private Endpoint resource. + public partial interface IPrivateEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The ARM identifier for Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The ARM identifier for Private Endpoint", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + + } + /// The Private Endpoint resource. + internal partial interface IPrivateEndpointInternal + + { + /// The ARM identifier for Private Endpoint + string Id { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpoint.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpoint.json.cs new file mode 100644 index 000000000000..3cd60e37001e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpoint.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Private Endpoint resource. + public partial class PrivateEndpoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PrivateEndpoint(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateEndpoint(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnection.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnection.cs new file mode 100644 index 000000000000..2bc1b1dcfbb7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnection.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Private Endpoint Connection resource. + public partial class PrivateEndpointConnection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// Internal Acessors for PrivateEndpoint + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value; } + + /// Internal Acessors for PrivateEndpointId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionInternal.PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value; } + + /// Internal Acessors for PrivateLinkServiceConnectionState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpointConnectionProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// The ARM identifier for Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; } + + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PrivateLinkServiceConnectionStateActionsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateActionsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateActionsRequired = value ?? null; } + + /// The reason for approval/rejection of the connection. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } + + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionProperties _property; + + /// Resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpointConnectionProperties()); set => this._property = value; } + + /// The provisioning state of the private endpoint connection resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public PrivateEndpointConnection() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The Private Endpoint Connection resource. + public partial interface IPrivateEndpointConnection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// The ARM identifier for Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The ARM identifier for Private Endpoint", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointId { get; } + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message indicating if changes on the service provider require any updates on the consumer.", + SerializedName = @"actionsRequired", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkServiceConnectionStateActionsRequired { get; set; } + /// The reason for approval/rejection of the connection. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The reason for approval/rejection of the connection.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkServiceConnectionStateDescription { get; set; } + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + /// The provisioning state of the private endpoint connection resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the private endpoint connection resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get; } + + } + /// The Private Endpoint Connection resource. + internal partial interface IPrivateEndpointConnectionInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// The resource of private end point. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint PrivateEndpoint { get; set; } + /// The ARM identifier for Private Endpoint + string PrivateEndpointId { get; set; } + /// + /// A collection of information about the state of the connection between service consumer and provider. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// + string PrivateLinkServiceConnectionStateActionsRequired { get; set; } + /// The reason for approval/rejection of the connection. + string PrivateLinkServiceConnectionStateDescription { get; set; } + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + /// Resource properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionProperties Property { get; set; } + /// The provisioning state of the private endpoint connection resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnection.json.cs new file mode 100644 index 000000000000..8eb238781bb4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnection.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Private Endpoint Connection resource. + public partial class PrivateEndpointConnection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PrivateEndpointConnection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateEndpointConnection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpointConnectionProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionListResult.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionListResult.cs new file mode 100644 index 000000000000..35f3512fbfc3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionListResult.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// List of private endpoint connection associated with the specified storage account + /// + public partial class PrivateEndpointConnectionListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionListResult, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionListResultInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] _value; + + /// Array of private endpoint connections + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public PrivateEndpointConnectionListResult() + { + + } + } + /// List of private endpoint connection associated with the specified storage account + public partial interface IPrivateEndpointConnectionListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Array of private endpoint connections + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of private endpoint connections", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] Value { get; set; } + + } + /// List of private endpoint connection associated with the specified storage account + internal partial interface IPrivateEndpointConnectionListResultInternal + + { + /// Array of private endpoint connections + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionListResult.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionListResult.json.cs new file mode 100644 index 000000000000..57713a5c2461 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionListResult.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// List of private endpoint connection associated with the specified storage account + /// + public partial class PrivateEndpointConnectionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateEndpointConnectionListResult(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpointConnection.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionProperties.cs new file mode 100644 index 000000000000..a6ef6df7b7a4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionProperties.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the PrivateEndpointConnectProperties. + public partial class PrivateEndpointConnectionProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal + { + + /// Internal Acessors for PrivateEndpoint + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpoint()); set { {_privateEndpoint = value;} } } + + /// Internal Acessors for PrivateEndpointId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointInternal)PrivateEndpoint).Id = value; } + + /// Internal Acessors for PrivateLinkServiceConnectionState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateLinkServiceConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint _privateEndpoint; + + /// The resource of private end point. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpoint()); set => this._privateEndpoint = value; } + + /// The ARM identifier for Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointInternal)PrivateEndpoint).Id; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState _privateLinkServiceConnectionState; + + /// + /// A collection of information about the state of the connection between service consumer and provider. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateLinkServiceConnectionState()); set => this._privateLinkServiceConnectionState = value; } + + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PrivateLinkServiceConnectionStateActionsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).ActionsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).ActionsRequired = value ?? null; } + + /// The reason for approval/rejection of the connection. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } + + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState? _provisioningState; + + /// The provisioning state of the private endpoint connection resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public PrivateEndpointConnectionProperties() + { + + } + } + /// Properties of the PrivateEndpointConnectProperties. + public partial interface IPrivateEndpointConnectionProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The ARM identifier for Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The ARM identifier for Private Endpoint", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointId { get; } + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message indicating if changes on the service provider require any updates on the consumer.", + SerializedName = @"actionsRequired", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkServiceConnectionStateActionsRequired { get; set; } + /// The reason for approval/rejection of the connection. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The reason for approval/rejection of the connection.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkServiceConnectionStateDescription { get; set; } + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + /// The provisioning state of the private endpoint connection resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the private endpoint connection resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get; } + + } + /// Properties of the PrivateEndpointConnectProperties. + internal partial interface IPrivateEndpointConnectionPropertiesInternal + + { + /// The resource of private end point. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpoint PrivateEndpoint { get; set; } + /// The ARM identifier for Private Endpoint + string PrivateEndpointId { get; set; } + /// + /// A collection of information about the state of the connection between service consumer and provider. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// + string PrivateLinkServiceConnectionStateActionsRequired { get; set; } + /// The reason for approval/rejection of the connection. + string PrivateLinkServiceConnectionStateDescription { get; set; } + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + /// The provisioning state of the private endpoint connection resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionProperties.json.cs new file mode 100644 index 000000000000..079aa192142c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateEndpointConnectionProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the PrivateEndpointConnectProperties. + public partial class PrivateEndpointConnectionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateEndpointConnectionProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : PrivateEndpoint;} + {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateLinkServiceConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : PrivateLinkServiceConnectionState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._privateEndpoint ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._privateEndpoint.ToJson(null,serializationMode) : null, "privateEndpoint" ,container.Add ); + AddIf( null != this._privateLinkServiceConnectionState ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._privateLinkServiceConnectionState.ToJson(null,serializationMode) : null, "privateLinkServiceConnectionState" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResource.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResource.cs new file mode 100644 index 000000000000..647ceed0b2aa --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResource.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A private link resource + public partial class PrivateLinkResource : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// The private link resource group id. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal)Property).GroupId; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// Internal Acessors for GroupId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceInternal.GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal)Property).GroupId = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateLinkResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for RequiredMember + string[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceInternal.RequiredMember { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceProperties _property; + + /// Resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateLinkResourceProperties()); set => this._property = value; } + + /// The private link resource required member names. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string[] RequiredMember { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember; } + + /// The private link resource Private link DNS zone name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string[] RequiredZoneName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName = value ?? null /* arrayOf */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public PrivateLinkResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// A private link resource + public partial interface IPrivateLinkResource : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// The private link resource group id. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The private link resource group id.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + string GroupId { get; } + /// The private link resource required member names. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The private link resource required member names.", + SerializedName = @"requiredMembers", + PossibleTypes = new [] { typeof(string) })] + string[] RequiredMember { get; } + /// The private link resource Private link DNS zone name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The private link resource Private link DNS zone name.", + SerializedName = @"requiredZoneNames", + PossibleTypes = new [] { typeof(string) })] + string[] RequiredZoneName { get; set; } + + } + /// A private link resource + internal partial interface IPrivateLinkResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// The private link resource group id. + string GroupId { get; set; } + /// Resource properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceProperties Property { get; set; } + /// The private link resource required member names. + string[] RequiredMember { get; set; } + /// The private link resource Private link DNS zone name. + string[] RequiredZoneName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResource.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResource.json.cs new file mode 100644 index 000000000000..917733f65e32 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResource.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A private link resource + public partial class PrivateLinkResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PrivateLinkResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateLinkResource(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateLinkResourceProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceListResult.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceListResult.cs new file mode 100644 index 000000000000..07f1cc29606c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceListResult.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A list of private link resources + public partial class PrivateLinkResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceListResultInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource[] _value; + + /// Array of private link resources + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public PrivateLinkResourceListResult() + { + + } + } + /// A list of private link resources + public partial interface IPrivateLinkResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Array of private link resources + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of private link resources", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource[] Value { get; set; } + + } + /// A list of private link resources + internal partial interface IPrivateLinkResourceListResultInternal + + { + /// Array of private link resources + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceListResult.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceListResult.json.cs new file mode 100644 index 000000000000..4ed75faa9b9c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceListResult.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A list of private link resources + public partial class PrivateLinkResourceListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PrivateLinkResourceListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateLinkResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResource) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateLinkResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceProperties.cs new file mode 100644 index 000000000000..743fe391db0f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceProperties.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of a private link resource. + public partial class PrivateLinkResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal + { + + /// Backing field for property. + private string _groupId; + + /// The private link resource group id. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string GroupId { get => this._groupId; } + + /// Internal Acessors for GroupId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal.GroupId { get => this._groupId; set { {_groupId = value;} } } + + /// Internal Acessors for RequiredMember + string[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourcePropertiesInternal.RequiredMember { get => this._requiredMember; set { {_requiredMember = value;} } } + + /// Backing field for property. + private string[] _requiredMember; + + /// The private link resource required member names. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] RequiredMember { get => this._requiredMember; } + + /// Backing field for property. + private string[] _requiredZoneName; + + /// The private link resource Private link DNS zone name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] RequiredZoneName { get => this._requiredZoneName; set => this._requiredZoneName = value; } + + /// Creates an new instance. + public PrivateLinkResourceProperties() + { + + } + } + /// Properties of a private link resource. + public partial interface IPrivateLinkResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The private link resource group id. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The private link resource group id.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + string GroupId { get; } + /// The private link resource required member names. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The private link resource required member names.", + SerializedName = @"requiredMembers", + PossibleTypes = new [] { typeof(string) })] + string[] RequiredMember { get; } + /// The private link resource Private link DNS zone name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The private link resource Private link DNS zone name.", + SerializedName = @"requiredZoneNames", + PossibleTypes = new [] { typeof(string) })] + string[] RequiredZoneName { get; set; } + + } + /// Properties of a private link resource. + internal partial interface IPrivateLinkResourcePropertiesInternal + + { + /// The private link resource group id. + string GroupId { get; set; } + /// The private link resource required member names. + string[] RequiredMember { get; set; } + /// The private link resource Private link DNS zone name. + string[] RequiredZoneName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceProperties.json.cs new file mode 100644 index 000000000000..a3405b148e1d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkResourceProperties.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of a private link resource. + public partial class PrivateLinkResourceProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PrivateLinkResourceProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateLinkResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_groupId = If( json?.PropertyT("groupId"), out var __jsonGroupId) ? (string)__jsonGroupId : (string)GroupId;} + {_requiredMember = If( json?.PropertyT("requiredMembers"), out var __jsonRequiredMembers) ? If( __jsonRequiredMembers as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : RequiredMember;} + {_requiredZoneName = If( json?.PropertyT("requiredZoneNames"), out var __jsonRequiredZoneNames) ? If( __jsonRequiredZoneNames as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : RequiredZoneName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._groupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._groupId.ToString()) : null, "groupId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._requiredMember) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._requiredMember ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("requiredMembers",__w); + } + } + if (null != this._requiredZoneName) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._requiredZoneName ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("requiredZoneNames",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkServiceConnectionState.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkServiceConnectionState.cs new file mode 100644 index 000000000000..11677655057d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkServiceConnectionState.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A collection of information about the state of the connection between service consumer and provider. + /// + public partial class PrivateLinkServiceConnectionState : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionStateInternal + { + + /// Backing field for property. + private string _actionsRequired; + + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ActionsRequired { get => this._actionsRequired; set => this._actionsRequired = value; } + + /// Backing field for property. + private string _description; + + /// The reason for approval/rejection of the connection. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? _status; + + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public PrivateLinkServiceConnectionState() + { + + } + } + /// A collection of information about the state of the connection between service consumer and provider. + public partial interface IPrivateLinkServiceConnectionState : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message indicating if changes on the service provider require any updates on the consumer.", + SerializedName = @"actionsRequired", + PossibleTypes = new [] { typeof(string) })] + string ActionsRequired { get; set; } + /// The reason for approval/rejection of the connection. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The reason for approval/rejection of the connection.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? Status { get; set; } + + } + /// A collection of information about the state of the connection between service consumer and provider. + internal partial interface IPrivateLinkServiceConnectionStateInternal + + { + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// + string ActionsRequired { get; set; } + /// The reason for approval/rejection of the connection. + string Description { get; set; } + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkServiceConnectionState.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkServiceConnectionState.json.cs new file mode 100644 index 000000000000..7f5e97b40680 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/PrivateLinkServiceConnectionState.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A collection of information about the state of the connection between service consumer and provider. + /// + public partial class PrivateLinkServiceConnectionState + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateLinkServiceConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PrivateLinkServiceConnectionState(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateLinkServiceConnectionState(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_actionsRequired = If( json?.PropertyT("actionsRequired"), out var __jsonActionsRequired) ? (string)__jsonActionsRequired : (string)ActionsRequired;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != (((object)this._actionsRequired)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._actionsRequired.ToString()) : null, "actionsRequired" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/ProxyResource.cs b/swaggerci/mediaservices/generated/api/Models/Api20/ProxyResource.cs new file mode 100644 index 000000000000..ef410a1919d3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/ProxyResource.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/ProxyResource.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/ProxyResource.json.cs new file mode 100644 index 000000000000..7f01c41c9d61 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/ProxyResource.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IProxyResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IProxyResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/Resource.cs b/swaggerci/mediaservices/generated/api/Models/Api20/Resource.cs new file mode 100644 index 000000000000..b048103dd9af --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/Resource.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _type; + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/Resource.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/Resource.json.cs new file mode 100644 index 000000000000..33c5bd6e57d3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/Resource.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/SystemData.cs b/swaggerci/mediaservices/generated/api/Models/Api20/SystemData.cs new file mode 100644 index 000000000000..39580eb06646 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/SystemData.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Metadata pertaining to creation and last modification of the resource. + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? LastModifiedByType { get; set; } + + } + /// Metadata pertaining to creation and last modification of the resource. + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC). + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/SystemData.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/SystemData.json.cs new file mode 100644 index 000000000000..b50ceb112fd7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/SystemData.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResource.cs b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResource.cs new file mode 100644 index 000000000000..eab1bafb22f8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResource.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.TrackedResourceTags()); set => this._tag = value; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// The geo-location where the resource lives + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResource.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResource.json.cs new file mode 100644 index 000000000000..db1e3b9612ad --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResource.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.TrackedResourceTags.FromJson(__jsonTags) : Tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.cs b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.cs new file mode 100644 index 000000000000..cb843aa5a936 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTagsInternal + { + + /// Creates an new instance. + public TrackedResourceTags() + { + + } + } + /// Resource tags. + public partial interface ITrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ITrackedResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.dictionary.cs b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.dictionary.cs new file mode 100644 index 000000000000..c45c8d37301b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.TrackedResourceTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.json.cs new file mode 100644 index 000000000000..1c0959264ef3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20/TrackedResourceTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + /// + internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AacAudio.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AacAudio.cs new file mode 100644 index 000000000000..1e3100c7e2bf --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AacAudio.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes Advanced Audio Codec (AAC) audio encoding settings. + public partial class AacAudio : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAacAudio, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAacAudioInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudio __audio = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Audio(); + + /// The bitrate, in bits per second, of the output encoded audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? Bitrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioInternal)__audio).Bitrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioInternal)__audio).Bitrate = value ?? default(int); } + + /// The number of channels in the audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? Channel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioInternal)__audio).Channel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioInternal)__audio).Channel = value ?? default(int); } + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__audio).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__audio).Label = value ?? null; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__audio).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__audio).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile? _profile; + + /// The encoding profile to be used when encoding audio with AAC. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile? Profile { get => this._profile; set => this._profile = value; } + + /// The sampling rate to use for encoding in hertz. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? SamplingRate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioInternal)__audio).SamplingRate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioInternal)__audio).SamplingRate = value ?? default(int); } + + /// Creates an new instance. + public AacAudio() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__audio), __audio); + await eventListener.AssertObjectIsValid(nameof(__audio), __audio); + } + } + /// Describes Advanced Audio Codec (AAC) audio encoding settings. + public partial interface IAacAudio : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudio + { + /// The encoding profile to be used when encoding audio with AAC. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The encoding profile to be used when encoding audio with AAC.", + SerializedName = @"profile", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile? Profile { get; set; } + + } + /// Describes Advanced Audio Codec (AAC) audio encoding settings. + internal partial interface IAacAudioInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioInternal + { + /// The encoding profile to be used when encoding audio with AAC. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile? Profile { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AacAudio.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AacAudio.json.cs new file mode 100644 index 000000000000..134e3cccfc99 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AacAudio.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes Advanced Audio Codec (AAC) audio encoding settings. + public partial class AacAudio + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AacAudio(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __audio = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Audio(json); + {_profile = If( json?.PropertyT("profile"), out var __jsonProfile) ? (string)__jsonProfile : (string)Profile;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAacAudio. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAacAudio. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAacAudio FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AacAudio(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __audio?.ToJson(container, serializationMode); + AddIf( null != (((object)this._profile)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._profile.ToString()) : null, "profile" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AbsoluteClipTime.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AbsoluteClipTime.cs new file mode 100644 index 000000000000..630675db3d5c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AbsoluteClipTime.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// 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. + /// + public partial class AbsoluteClipTime : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAbsoluteClipTime, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAbsoluteClipTimeInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime __clipTime = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal)__clipTime).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal)__clipTime).OdataType = value ; } + + /// Backing field for property. + private global::System.TimeSpan _time; + + /// + /// The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S for 30 seconds. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan Time { get => this._time; set => this._time = value; } + + /// Creates an new instance. + public AbsoluteClipTime() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__clipTime), __clipTime); + await eventListener.AssertObjectIsValid(nameof(__clipTime), __clipTime); + } + } + /// 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. + public partial interface IAbsoluteClipTime : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime + { + /// + /// The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S for 30 seconds. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S for 30 seconds.", + SerializedName = @"time", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan Time { get; set; } + + } + /// 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. + internal partial interface IAbsoluteClipTimeInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal + { + /// + /// The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S for 30 seconds. + /// + global::System.TimeSpan Time { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AbsoluteClipTime.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AbsoluteClipTime.json.cs new file mode 100644 index 000000000000..30b03547ecca --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AbsoluteClipTime.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// 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. + /// + public partial class AbsoluteClipTime + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AbsoluteClipTime(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __clipTime = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime(json); + {_time = If( json?.PropertyT("time"), out var __jsonTime) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonTime ) : Time;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAbsoluteClipTime. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAbsoluteClipTime. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAbsoluteClipTime FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AbsoluteClipTime(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __clipTime?.ToJson(container, serializationMode); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._time)), "time" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AccessControl.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AccessControl.cs new file mode 100644 index 000000000000..2f1a0045316a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AccessControl.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class AccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControlInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? _defaultAction; + + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? DefaultAction { get => this._defaultAction; set => this._defaultAction = value; } + + /// Backing field for property. + private string[] _iPAllowList; + + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] IPAllowList { get => this._iPAllowList; set => this._iPAllowList = value; } + + /// Creates an new instance. + public AccessControl() + { + + } + } + public partial interface IAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The behavior for IP access control in Key Delivery.", + SerializedName = @"defaultAction", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? DefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must be empty.", + SerializedName = @"ipAllowList", + PossibleTypes = new [] { typeof(string) })] + string[] IPAllowList { get; set; } + + } + internal partial interface IAccessControlInternal + + { + /// The behavior for IP access control in Key Delivery. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? DefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + string[] IPAllowList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AccessControl.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AccessControl.json.cs new file mode 100644 index 000000000000..0cf5bfc52458 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AccessControl.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class AccessControl + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AccessControl(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_defaultAction = If( json?.PropertyT("defaultAction"), out var __jsonDefaultAction) ? (string)__jsonDefaultAction : (string)DefaultAction;} + {_iPAllowList = If( json?.PropertyT("ipAllowList"), out var __jsonIPAllowList) ? If( __jsonIPAllowList as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : IPAllowList;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AccessControl(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._defaultAction)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._defaultAction.ToString()) : null, "defaultAction" ,container.Add ); + if (null != this._iPAllowList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._iPAllowList ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("ipAllowList",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AccountEncryption.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AccountEncryption.cs new file mode 100644 index 000000000000..b9baf2fbc39a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AccountEncryption.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class AccountEncryption : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity _identity; + + /// The Key Vault identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ResourceIdentity()); set => this._identity = value; } + + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? IdentityUseSystemAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentityInternal)Identity).UseSystemAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentityInternal)Identity).UseSystemAssignedIdentity = value ?? default(bool); } + + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentityInternal)Identity).UserAssignedIdentity = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties _keyVaultProperty; + + /// The properties of the key used to encrypt the account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties KeyVaultProperty { get => (this._keyVaultProperty = this._keyVaultProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.KeyVaultProperties()); set => this._keyVaultProperty = value; } + + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string KeyVaultPropertyCurrentKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultPropertiesInternal)KeyVaultProperty).CurrentKeyIdentifier; } + + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string KeyVaultPropertyKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultPropertiesInternal)KeyVaultProperty).KeyIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultPropertiesInternal)KeyVaultProperty).KeyIdentifier = value ?? null; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ResourceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for KeyVaultProperty + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal.KeyVaultProperty { get => (this._keyVaultProperty = this._keyVaultProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.KeyVaultProperties()); set { {_keyVaultProperty = value;} } } + + /// Internal Acessors for KeyVaultPropertyCurrentKeyIdentifier + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal.KeyVaultPropertyCurrentKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultPropertiesInternal)KeyVaultProperty).CurrentKeyIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultPropertiesInternal)KeyVaultProperty).CurrentKeyIdentifier = value; } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private string _status; + + /// The current status of the Key Vault mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Status { get => this._status; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType _type; + + /// The type of key used to encrypt the Account Key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public AccountEncryption() + { + + } + } + public partial interface IAccountEncryption : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity.", + SerializedName = @"useSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user assigned managed identity's ARM ID to use when accessing a resource.", + SerializedName = @"userAssignedIdentity", + PossibleTypes = new [] { typeof(string) })] + string IdentityUserAssignedIdentity { get; set; } + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current key used to encrypt the Media Services account, including the key version.", + SerializedName = @"currentKeyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultPropertyCurrentKeyIdentifier { get; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key without a version (for example https://vault/keys/mykey).", + SerializedName = @"keyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultPropertyKeyIdentifier { get; set; } + /// The current status of the Key Vault mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current status of the Key Vault mapping.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; } + /// The type of key used to encrypt the Account Key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of key used to encrypt the Account Key.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType Type { get; set; } + + } + internal partial interface IAccountEncryptionInternal + + { + /// The Key Vault identity. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity Identity { get; set; } + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + string IdentityUserAssignedIdentity { get; set; } + /// The properties of the key used to encrypt the account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties KeyVaultProperty { get; set; } + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + string KeyVaultPropertyCurrentKeyIdentifier { get; set; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + string KeyVaultPropertyKeyIdentifier { get; set; } + /// The current status of the Key Vault mapping. + string Status { get; set; } + /// The type of key used to encrypt the Account Key. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AccountEncryption.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AccountEncryption.json.cs new file mode 100644 index 000000000000..601d05f1cde1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AccountEncryption.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class AccountEncryption + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AccountEncryption(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_keyVaultProperty = If( json?.PropertyT("keyVaultProperties"), out var __jsonKeyVaultProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.KeyVaultProperties.FromJson(__jsonKeyVaultProperties) : KeyVaultProperty;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ResourceIdentity.FromJson(__jsonIdentity) : Identity;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AccountEncryption(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._keyVaultProperty ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._keyVaultProperty.ToJson(null,serializationMode) : null, "keyVaultProperties" ,container.Add ); + AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Audio.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Audio.cs new file mode 100644 index 000000000000..732232aa8aa7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Audio.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Defines the common properties for all audio codecs. + public partial class Audio : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudio, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec __codec = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Codec(); + + /// Backing field for property. + private int? _bitrate; + + /// The bitrate, in bits per second, of the output encoded audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Bitrate { get => this._bitrate; set => this._bitrate = value; } + + /// Backing field for property. + private int? _channel; + + /// The number of channels in the audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Channel { get => this._channel; set => this._channel = value; } + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).Label = value ?? null; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).OdataType = value ; } + + /// Backing field for property. + private int? _samplingRate; + + /// The sampling rate to use for encoding in hertz. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? SamplingRate { get => this._samplingRate; set => this._samplingRate = value; } + + /// Creates an new instance. + public Audio() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__codec), __codec); + await eventListener.AssertObjectIsValid(nameof(__codec), __codec); + } + } + /// Defines the common properties for all audio codecs. + public partial interface IAudio : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec + { + /// The bitrate, in bits per second, of the output encoded audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bitrate, in bits per second, of the output encoded audio.", + SerializedName = @"bitrate", + PossibleTypes = new [] { typeof(int) })] + int? Bitrate { get; set; } + /// The number of channels in the audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of channels in the audio.", + SerializedName = @"channels", + PossibleTypes = new [] { typeof(int) })] + int? Channel { get; set; } + /// The sampling rate to use for encoding in hertz. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The sampling rate to use for encoding in hertz.", + SerializedName = @"samplingRate", + PossibleTypes = new [] { typeof(int) })] + int? SamplingRate { get; set; } + + } + /// Defines the common properties for all audio codecs. + internal partial interface IAudioInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal + { + /// The bitrate, in bits per second, of the output encoded audio. + int? Bitrate { get; set; } + /// The number of channels in the audio. + int? Channel { get; set; } + /// The sampling rate to use for encoding in hertz. + int? SamplingRate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Audio.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Audio.json.cs new file mode 100644 index 000000000000..814cccd596ae --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Audio.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Defines the common properties for all audio codecs. + public partial class Audio + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Audio(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __codec = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Codec(json); + {_channel = If( json?.PropertyT("channels"), out var __jsonChannels) ? (int?)__jsonChannels : Channel;} + {_samplingRate = If( json?.PropertyT("samplingRate"), out var __jsonSamplingRate) ? (int?)__jsonSamplingRate : SamplingRate;} + {_bitrate = If( json?.PropertyT("bitrate"), out var __jsonBitrate) ? (int?)__jsonBitrate : Bitrate;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudio. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudio interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudio. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudio FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.AacAudio": + { + return new AacAudio(json); + } + } + return new Audio(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __codec?.ToJson(container, serializationMode); + AddIf( null != this._channel ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._channel) : null, "channels" ,container.Add ); + AddIf( null != this._samplingRate ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._samplingRate) : null, "samplingRate" ,container.Add ); + AddIf( null != this._bitrate ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._bitrate) : null, "bitrate" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPreset.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPreset.cs new file mode 100644 index 000000000000..2117916dd690 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPreset.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. Currently, + /// the preset supports processing of content with a single audio track. + /// + public partial class AudioAnalyzerPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPreset, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset __preset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset(); + + /// Backing field for property. + private string _audioLanguage; + + /// + /// The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you + /// know the language of your content, it is recommended that you specify it. The language must be specified explicitly for + /// AudioAnalysisMode::Basic, since automatic language detection is not included in basic mode. If the language isn't specified + /// or set to null, automatic language detection will choose the first language detected and process with the selected language + /// for the duration of the file. It does not currently support dynamically switching between languages after the first language + /// is detected. The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection + /// fails to find the language, transcription would fallback to 'en-US'." The list of supported languages is available here: + /// https://go.microsoft.com/fwlink/?linkid=2109463 + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AudioLanguage { get => this._audioLanguage; set => this._audioLanguage = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions _experimentalOption; + + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions ExperimentalOption { get => (this._experimentalOption = this._experimentalOption ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AudioAnalyzerPresetExperimentalOptions()); set => this._experimentalOption = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode? _mode; + + /// + /// Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would + /// be chosen. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode? Mode { get => this._mode; set => this._mode = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__preset).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__preset).OdataType = value ; } + + /// Creates an new instance. + public AudioAnalyzerPreset() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__preset), __preset); + await eventListener.AssertObjectIsValid(nameof(__preset), __preset); + } + } + /// The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. Currently, + /// the preset supports processing of content with a single audio track. + public partial interface IAudioAnalyzerPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset + { + /// + /// The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you + /// know the language of your content, it is recommended that you specify it. The language must be specified explicitly for + /// AudioAnalysisMode::Basic, since automatic language detection is not included in basic mode. If the language isn't specified + /// or set to null, automatic language detection will choose the first language detected and process with the selected language + /// for the duration of the file. It does not currently support dynamically switching between languages after the first language + /// is detected. The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection + /// fails to find the language, transcription would fallback to 'en-US'." The list of supported languages is available here: + /// https://go.microsoft.com/fwlink/?linkid=2109463 + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you know the language of your content, it is recommended that you specify it. The language must be specified explicitly for AudioAnalysisMode::Basic, since automatic language detection is not included in basic mode. If the language isn't specified or set to null, automatic language detection will choose the first language detected and process with the selected language for the duration of the file. It does not currently support dynamically switching between languages after the first language is detected. The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection fails to find the language, transcription would fallback to 'en-US'."" The list of supported languages is available here: https://go.microsoft.com/fwlink/?linkid=2109463", + SerializedName = @"audioLanguage", + PossibleTypes = new [] { typeof(string) })] + string AudioLanguage { get; set; } + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Dictionary containing key value pairs for parameters not exposed in the preset itself", + SerializedName = @"experimentalOptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions ExperimentalOption { get; set; } + /// + /// Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would + /// be chosen. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would be chosen.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode? Mode { get; set; } + + } + /// The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. Currently, + /// the preset supports processing of content with a single audio track. + internal partial interface IAudioAnalyzerPresetInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal + { + /// + /// The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you + /// know the language of your content, it is recommended that you specify it. The language must be specified explicitly for + /// AudioAnalysisMode::Basic, since automatic language detection is not included in basic mode. If the language isn't specified + /// or set to null, automatic language detection will choose the first language detected and process with the selected language + /// for the duration of the file. It does not currently support dynamically switching between languages after the first language + /// is detected. The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection + /// fails to find the language, transcription would fallback to 'en-US'." The list of supported languages is available here: + /// https://go.microsoft.com/fwlink/?linkid=2109463 + /// + string AudioLanguage { get; set; } + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions ExperimentalOption { get; set; } + /// + /// Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would + /// be chosen. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode? Mode { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPreset.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPreset.json.cs new file mode 100644 index 000000000000..d67257bb8e36 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPreset.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. Currently, + /// the preset supports processing of content with a single audio track. + /// + public partial class AudioAnalyzerPreset + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AudioAnalyzerPreset(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __preset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset(json); + {_audioLanguage = If( json?.PropertyT("audioLanguage"), out var __jsonAudioLanguage) ? (string)__jsonAudioLanguage : (string)AudioLanguage;} + {_mode = If( json?.PropertyT("mode"), out var __jsonMode) ? (string)__jsonMode : (string)Mode;} + {_experimentalOption = If( json?.PropertyT("experimentalOptions"), out var __jsonExperimentalOptions) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AudioAnalyzerPresetExperimentalOptions.FromJson(__jsonExperimentalOptions) : ExperimentalOption;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPreset. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPreset interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPreset. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPreset FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.VideoAnalyzerPreset": + { + return new VideoAnalyzerPreset(json); + } + } + return new AudioAnalyzerPreset(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __preset?.ToJson(container, serializationMode); + AddIf( null != (((object)this._audioLanguage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._audioLanguage.ToString()) : null, "audioLanguage" ,container.Add ); + AddIf( null != (((object)this._mode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._mode.ToString()) : null, "mode" ,container.Add ); + AddIf( null != this._experimentalOption ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._experimentalOption.ToJson(null,serializationMode) : null, "experimentalOptions" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.cs new file mode 100644 index 000000000000..ea85e9f52a16 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + public partial class AudioAnalyzerPresetExperimentalOptions : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptionsInternal + { + + /// Creates an new instance. + public AudioAnalyzerPresetExperimentalOptions() + { + + } + } + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + public partial interface IAudioAnalyzerPresetExperimentalOptions : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + + } + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + internal partial interface IAudioAnalyzerPresetExperimentalOptionsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.dictionary.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.dictionary.cs new file mode 100644 index 000000000000..3356acd60e60 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class AudioAnalyzerPresetExperimentalOptions : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AudioAnalyzerPresetExperimentalOptions source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.json.cs new file mode 100644 index 000000000000..2537d77ecad3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioAnalyzerPresetExperimentalOptions.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + public partial class AudioAnalyzerPresetExperimentalOptions + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AudioAnalyzerPresetExperimentalOptions(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AudioAnalyzerPresetExperimentalOptions(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioOverlay.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioOverlay.cs new file mode 100644 index 000000000000..92071985f1b7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioOverlay.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the properties of an audio overlay. + public partial class AudioOverlay : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioOverlay, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioOverlayInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay __overlay = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Overlay(); + + /// + /// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public double? AudioGainLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).AudioGainLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).AudioGainLevel = value ?? default(double); } + + /// + /// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format. + /// For example, PT30S to end the overlay at 30 seconds into the input video. If not specified or the value is greater than + /// the input video duration, the overlay will be applied until the end of the input video if the overlay media duration is + /// greater than the input video duration, else the overlay will last as long as the overlay media duration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? End { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).End; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).End = value ?? default(global::System.TimeSpan); } + + /// + /// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade in (same as PT0S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? FadeInDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).FadeInDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).FadeInDuration = value ?? default(global::System.TimeSpan); } + + /// + /// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade out (same as PT0S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? FadeOutDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).FadeOutDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).FadeOutDuration = value ?? default(global::System.TimeSpan); } + + /// + /// The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify + /// an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. + /// See https://aka.ms/mesformats for the complete list of supported audio and video file formats. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string InputLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).InputLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).InputLabel = value ; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).OdataType = value ; } + + /// + /// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. + /// For example, PT05S to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the + /// beginning of the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? Start { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).Start; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).Start = value ?? default(global::System.TimeSpan); } + + /// Creates an new instance. + public AudioOverlay() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__overlay), __overlay); + await eventListener.AssertObjectIsValid(nameof(__overlay), __overlay); + } + } + /// Describes the properties of an audio overlay. + public partial interface IAudioOverlay : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay + { + + } + /// Describes the properties of an audio overlay. + internal partial interface IAudioOverlayInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioOverlay.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioOverlay.json.cs new file mode 100644 index 000000000000..bb2667691117 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioOverlay.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the properties of an audio overlay. + public partial class AudioOverlay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AudioOverlay(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __overlay = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Overlay(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioOverlay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioOverlay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioOverlay FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AudioOverlay(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __overlay?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioTrackDescriptor.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioTrackDescriptor.cs new file mode 100644 index 000000000000..1631ddbe3941 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioTrackDescriptor.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A TrackSelection to select audio tracks. + public partial class AudioTrackDescriptor : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptorInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor __trackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TrackDescriptor(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping? _channelMapping; + + /// + /// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio + /// tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping? ChannelMapping { get => this._channelMapping; set => this._channelMapping = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__trackDescriptor).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__trackDescriptor).OdataType = value ; } + + /// Creates an new instance. + public AudioTrackDescriptor() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackDescriptor), __trackDescriptor); + await eventListener.AssertObjectIsValid(nameof(__trackDescriptor), __trackDescriptor); + } + } + /// A TrackSelection to select audio tracks. + public partial interface IAudioTrackDescriptor : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor + { + /// + /// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio + /// tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio tracks.", + SerializedName = @"channelMapping", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping? ChannelMapping { get; set; } + + } + /// A TrackSelection to select audio tracks. + internal partial interface IAudioTrackDescriptorInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal + { + /// + /// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio + /// tracks. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping? ChannelMapping { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioTrackDescriptor.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioTrackDescriptor.json.cs new file mode 100644 index 000000000000..75ebf1e98a1b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/AudioTrackDescriptor.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A TrackSelection to select audio tracks. + public partial class AudioTrackDescriptor + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AudioTrackDescriptor(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TrackDescriptor(json); + {_channelMapping = If( json?.PropertyT("channelMapping"), out var __jsonChannelMapping) ? (string)__jsonChannelMapping : (string)ChannelMapping;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.SelectAudioTrackByAttribute": + { + return new SelectAudioTrackByAttribute(json); + } + case "#Microsoft.Media.SelectAudioTrackById": + { + return new SelectAudioTrackById(json); + } + } + return new AudioTrackDescriptor(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackDescriptor?.ToJson(container, serializationMode); + AddIf( null != (((object)this._channelMapping)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._channelMapping.ToString()) : null, "channelMapping" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/BuiltInStandardEncoderPreset.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/BuiltInStandardEncoderPreset.cs new file mode 100644 index 000000000000..cea3f5863ddd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/BuiltInStandardEncoderPreset.cs @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes a built-in preset for encoding the input video with the Standard Encoder. + /// + public partial class BuiltInStandardEncoderPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IBuiltInStandardEncoderPreset, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IBuiltInStandardEncoderPresetInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset __preset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurations _configuration; + + /// + /// Optional configuration settings for encoder. Configurations is only supported for ContentAwareEncoding and H265ContentAwareEncoding + /// BuiltInStandardEncoderPreset. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurations Configuration { get => (this._configuration = this._configuration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.PresetConfigurations()); set => this._configuration = value; } + + /// + /// Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity + /// as Speed for faster encoding but less compression efficiency. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity? ConfigurationComplexity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).Complexity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).Complexity = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity)""); } + + /// + /// Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set + /// InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput? ConfigurationInterleaveOutput { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).InterleaveOutput; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).InterleaveOutput = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput)""); } + + /// + /// The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some + /// players. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public float? ConfigurationKeyFrameIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).KeyFrameIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).KeyFrameIntervalInSecond = value ?? default(float); } + + /// + /// The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid + /// producing very high bitrate outputs for contents with high complexity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? ConfigurationMaxBitrateBps { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MaxBitrateBps; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MaxBitrateBps = value ?? default(int); } + + /// + /// The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the + /// input is 4K. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? ConfigurationMaxHeight { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MaxHeight; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MaxHeight = value ?? default(int); } + + /// + /// The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced + /// to control the overall cost of the encoding job. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? ConfigurationMaxLayer { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MaxLayer; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MaxLayer = value ?? default(int); } + + /// + /// The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to + /// have a bottom layer that covers users with low network bandwidth. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? ConfigurationMinBitrateBps { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MinBitrateBps; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MinBitrateBps = value ?? default(int); } + + /// + /// The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions + /// like 180P. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? ConfigurationMinHeight { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MinHeight; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal)Configuration).MinHeight = value ?? default(int); } + + /// Internal Acessors for Configuration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurations Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IBuiltInStandardEncoderPresetInternal.Configuration { get => (this._configuration = this._configuration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.PresetConfigurations()); set { {_configuration = value;} } } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__preset).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__preset).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset _presetName; + + /// The built-in preset to be used for encoding videos. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset PresetName { get => this._presetName; set => this._presetName = value; } + + /// Creates an new instance. + public BuiltInStandardEncoderPreset() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__preset), __preset); + await eventListener.AssertObjectIsValid(nameof(__preset), __preset); + } + } + /// Describes a built-in preset for encoding the input video with the Standard Encoder. + public partial interface IBuiltInStandardEncoderPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset + { + /// + /// Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity + /// as Speed for faster encoding but less compression efficiency. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity as Speed for faster encoding but less compression efficiency.", + SerializedName = @"complexity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity? ConfigurationComplexity { get; set; } + /// + /// Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set + /// InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files.", + SerializedName = @"interleaveOutput", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput? ConfigurationInterleaveOutput { get; set; } + /// + /// The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some + /// players. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some players.", + SerializedName = @"keyFrameIntervalInSeconds", + PossibleTypes = new [] { typeof(float) })] + float? ConfigurationKeyFrameIntervalInSecond { get; set; } + /// + /// The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid + /// producing very high bitrate outputs for contents with high complexity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid producing very high bitrate outputs for contents with high complexity.", + SerializedName = @"maxBitrateBps", + PossibleTypes = new [] { typeof(int) })] + int? ConfigurationMaxBitrateBps { get; set; } + /// + /// The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the + /// input is 4K. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the input is 4K.", + SerializedName = @"maxHeight", + PossibleTypes = new [] { typeof(int) })] + int? ConfigurationMaxHeight { get; set; } + /// + /// The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced + /// to control the overall cost of the encoding job. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced to control the overall cost of the encoding job.", + SerializedName = @"maxLayers", + PossibleTypes = new [] { typeof(int) })] + int? ConfigurationMaxLayer { get; set; } + /// + /// The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to + /// have a bottom layer that covers users with low network bandwidth. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to have a bottom layer that covers users with low network bandwidth.", + SerializedName = @"minBitrateBps", + PossibleTypes = new [] { typeof(int) })] + int? ConfigurationMinBitrateBps { get; set; } + /// + /// The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions + /// like 180P. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions like 180P.", + SerializedName = @"minHeight", + PossibleTypes = new [] { typeof(int) })] + int? ConfigurationMinHeight { get; set; } + /// The built-in preset to be used for encoding videos. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The built-in preset to be used for encoding videos.", + SerializedName = @"presetName", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset PresetName { get; set; } + + } + /// Describes a built-in preset for encoding the input video with the Standard Encoder. + internal partial interface IBuiltInStandardEncoderPresetInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal + { + /// + /// Optional configuration settings for encoder. Configurations is only supported for ContentAwareEncoding and H265ContentAwareEncoding + /// BuiltInStandardEncoderPreset. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurations Configuration { get; set; } + /// + /// Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity + /// as Speed for faster encoding but less compression efficiency. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity? ConfigurationComplexity { get; set; } + /// + /// Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set + /// InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput? ConfigurationInterleaveOutput { get; set; } + /// + /// The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some + /// players. + /// + float? ConfigurationKeyFrameIntervalInSecond { get; set; } + /// + /// The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid + /// producing very high bitrate outputs for contents with high complexity. + /// + int? ConfigurationMaxBitrateBps { get; set; } + /// + /// The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the + /// input is 4K. + /// + int? ConfigurationMaxHeight { get; set; } + /// + /// The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced + /// to control the overall cost of the encoding job. + /// + int? ConfigurationMaxLayer { get; set; } + /// + /// The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to + /// have a bottom layer that covers users with low network bandwidth. + /// + int? ConfigurationMinBitrateBps { get; set; } + /// + /// The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions + /// like 180P. + /// + int? ConfigurationMinHeight { get; set; } + /// The built-in preset to be used for encoding videos. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset PresetName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/BuiltInStandardEncoderPreset.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/BuiltInStandardEncoderPreset.json.cs new file mode 100644 index 000000000000..06df772f835c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/BuiltInStandardEncoderPreset.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes a built-in preset for encoding the input video with the Standard Encoder. + /// + public partial class BuiltInStandardEncoderPreset + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal BuiltInStandardEncoderPreset(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __preset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset(json); + {_configuration = If( json?.PropertyT("configurations"), out var __jsonConfigurations) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.PresetConfigurations.FromJson(__jsonConfigurations) : Configuration;} + {_presetName = If( json?.PropertyT("presetName"), out var __jsonPresetName) ? (string)__jsonPresetName : (string)PresetName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IBuiltInStandardEncoderPreset. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IBuiltInStandardEncoderPreset. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IBuiltInStandardEncoderPreset FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new BuiltInStandardEncoderPreset(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __preset?.ToJson(container, serializationMode); + AddIf( null != this._configuration ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._configuration.ToJson(null,serializationMode) : null, "configurations" ,container.Add ); + AddIf( null != (((object)this._presetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._presetName.ToString()) : null, "presetName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/CheckNameAvailabilityInput.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/CheckNameAvailabilityInput.cs new file mode 100644 index 000000000000..cdbbd01d98ab --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/CheckNameAvailabilityInput.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The input to the check name availability request. + public partial class CheckNameAvailabilityInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICheckNameAvailabilityInput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICheckNameAvailabilityInputInternal + { + + /// Backing field for property. + private string _name; + + /// The account name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _type; + + /// The account type. For a Media Services account, this should be 'MediaServices'. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public CheckNameAvailabilityInput() + { + + } + } + /// The input to the check name availability request. + public partial interface ICheckNameAvailabilityInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The account name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The account name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The account type. For a Media Services account, this should be 'MediaServices'. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The account type. For a Media Services account, this should be 'MediaServices'.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// The input to the check name availability request. + internal partial interface ICheckNameAvailabilityInputInternal + + { + /// The account name. + string Name { get; set; } + /// The account type. For a Media Services account, this should be 'MediaServices'. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/CheckNameAvailabilityInput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/CheckNameAvailabilityInput.json.cs new file mode 100644 index 000000000000..f8a34d0299bc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/CheckNameAvailabilityInput.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The input to the check name availability request. + public partial class CheckNameAvailabilityInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal CheckNameAvailabilityInput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICheckNameAvailabilityInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICheckNameAvailabilityInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICheckNameAvailabilityInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new CheckNameAvailabilityInput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ClipTime.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ClipTime.cs new file mode 100644 index 000000000000..deee105a10b2 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ClipTime.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for specifying a clip time. Use sub classes of this class to specify the time position in the media. + /// + public partial class ClipTime : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal + { + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public ClipTime() + { + + } + } + /// Base class for specifying a clip time. Use sub classes of this class to specify the time position in the media. + public partial interface IClipTime : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base class for specifying a clip time. Use sub classes of this class to specify the time position in the media. + internal partial interface IClipTimeInternal + + { + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ClipTime.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ClipTime.json.cs new file mode 100644 index 000000000000..882e2693fbd7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ClipTime.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for specifying a clip time. Use sub classes of this class to specify the time position in the media. + /// + public partial class ClipTime + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ClipTime(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.AbsoluteClipTime": + { + return new AbsoluteClipTime(json); + } + case "#Microsoft.Media.UtcClipTime": + { + return new UtcClipTime(json); + } + } + return new ClipTime(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Codec.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Codec.cs new file mode 100644 index 000000000000..80b28e026071 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Codec.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the basic properties of all codecs. + public partial class Codec : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal + { + + /// Backing field for property. + private string _label; + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Label { get => this._label; set => this._label = value; } + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public Codec() + { + + } + } + /// Describes the basic properties of all codecs. + public partial interface ICodec : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An optional label for the codec. The label can be used to control muxing behavior.", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string Label { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Describes the basic properties of all codecs. + internal partial interface ICodecInternal + + { + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + string Label { get; set; } + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Codec.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Codec.json.cs new file mode 100644 index 000000000000..e82b71add141 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Codec.json.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the basic properties of all codecs. + public partial class Codec + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Codec(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + {_label = If( json?.PropertyT("label"), out var __jsonLabel) ? (string)__jsonLabel : (string)Label;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.Audio": + { + return new Audio(json); + } + case "#Microsoft.Media.AacAudio": + { + return new AacAudio(json); + } + case "#Microsoft.Media.Video": + { + return new Video(json); + } + case "#Microsoft.Media.H265Video": + { + return new H265Video(json); + } + case "#Microsoft.Media.CopyVideo": + { + return new CopyVideo(json); + } + case "#Microsoft.Media.Image": + { + return new Image(json); + } + case "#Microsoft.Media.CopyAudio": + { + return new CopyAudio(json); + } + case "#Microsoft.Media.H264Video": + { + return new H264Video(json); + } + case "#Microsoft.Media.JpgImage": + { + return new JpgImage(json); + } + case "#Microsoft.Media.PngImage": + { + return new PngImage(json); + } + } + return new Codec(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AddIf( null != (((object)this._label)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._label.ToString()) : null, "label" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyAudio.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyAudio.cs new file mode 100644 index 000000000000..ddc66627de97 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyAudio.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A codec flag, which tells the encoder to copy the input audio bitstream. + public partial class CopyAudio : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyAudio, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyAudioInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec __codec = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Codec(); + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).Label = value ?? null; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).OdataType = value ; } + + /// Creates an new instance. + public CopyAudio() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__codec), __codec); + await eventListener.AssertObjectIsValid(nameof(__codec), __codec); + } + } + /// A codec flag, which tells the encoder to copy the input audio bitstream. + public partial interface ICopyAudio : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec + { + + } + /// A codec flag, which tells the encoder to copy the input audio bitstream. + internal partial interface ICopyAudioInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyAudio.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyAudio.json.cs new file mode 100644 index 000000000000..171c67254c5e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyAudio.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A codec flag, which tells the encoder to copy the input audio bitstream. + public partial class CopyAudio + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal CopyAudio(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __codec = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Codec(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyAudio. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyAudio. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyAudio FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new CopyAudio(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __codec?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyVideo.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyVideo.cs new file mode 100644 index 000000000000..57ce643ee334 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyVideo.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A codec flag, which tells the encoder to copy the input video bitstream without re-encoding. + /// + public partial class CopyVideo : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyVideo, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyVideoInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec __codec = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Codec(); + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).Label = value ?? null; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).OdataType = value ; } + + /// Creates an new instance. + public CopyVideo() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__codec), __codec); + await eventListener.AssertObjectIsValid(nameof(__codec), __codec); + } + } + /// A codec flag, which tells the encoder to copy the input video bitstream without re-encoding. + public partial interface ICopyVideo : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec + { + + } + /// A codec flag, which tells the encoder to copy the input video bitstream without re-encoding. + internal partial interface ICopyVideoInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyVideo.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyVideo.json.cs new file mode 100644 index 000000000000..defc3dc17763 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/CopyVideo.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A codec flag, which tells the encoder to copy the input video bitstream without re-encoding. + /// + public partial class CopyVideo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal CopyVideo(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __codec = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Codec(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyVideo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyVideo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new CopyVideo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __codec?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Deinterlace.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Deinterlace.cs new file mode 100644 index 000000000000..4c1159248490 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Deinterlace.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the de-interlacing settings. + public partial class Deinterlace : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlaceInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? _mode; + + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? Mode { get => this._mode; set => this._mode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? _parity; + + /// The field parity for de-interlacing, defaults to Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? Parity { get => this._parity; set => this._parity = value; } + + /// Creates an new instance. + public Deinterlace() + { + + } + } + /// Describes the de-interlacing settings. + public partial interface IDeinterlace : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The deinterlacing mode. Defaults to AutoPixelAdaptive.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? Mode { get; set; } + /// The field parity for de-interlacing, defaults to Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The field parity for de-interlacing, defaults to Auto.", + SerializedName = @"parity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? Parity { get; set; } + + } + /// Describes the de-interlacing settings. + internal partial interface IDeinterlaceInternal + + { + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? Mode { get; set; } + /// The field parity for de-interlacing, defaults to Auto. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? Parity { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Deinterlace.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Deinterlace.json.cs new file mode 100644 index 000000000000..58f2bc3cea1c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Deinterlace.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the de-interlacing settings. + public partial class Deinterlace + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Deinterlace(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_parity = If( json?.PropertyT("parity"), out var __jsonParity) ? (string)__jsonParity : (string)Parity;} + {_mode = If( json?.PropertyT("mode"), out var __jsonMode) ? (string)__jsonMode : (string)Mode;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Deinterlace(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._parity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._parity.ToString()) : null, "parity" ,container.Add ); + AddIf( null != (((object)this._mode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._mode.ToString()) : null, "mode" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgePolicies.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgePolicies.cs new file mode 100644 index 000000000000..29e2c01a1b55 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgePolicies.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class EdgePolicies : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgePolicies, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgePoliciesInternal + { + + /// Name of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EventHubDetailName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).EventHubDetailName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).EventHubDetailName = value ?? null; } + + /// Namespace of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EventHubDetailNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).EventHubDetailNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).EventHubDetailNamespace = value ?? null; } + + /// SAS token needed to interact with Event Hub. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EventHubDetailToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).EventHubDetailToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).EventHubDetailToken = value ?? null; } + + /// Internal Acessors for UsageDataCollectionPolicy + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicy Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgePoliciesInternal.UsageDataCollectionPolicy { get => (this._usageDataCollectionPolicy = this._usageDataCollectionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.EdgeUsageDataCollectionPolicy()); set { {_usageDataCollectionPolicy = value;} } } + + /// Internal Acessors for UsageDataCollectionPolicyEventHubDetail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgePoliciesInternal.UsageDataCollectionPolicyEventHubDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).EventHubDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).EventHubDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicy _usageDataCollectionPolicy; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicy UsageDataCollectionPolicy { get => (this._usageDataCollectionPolicy = this._usageDataCollectionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.EdgeUsageDataCollectionPolicy()); set => this._usageDataCollectionPolicy = value; } + + /// Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string UsageDataCollectionPolicyDataCollectionFrequency { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).DataCollectionFrequency; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).DataCollectionFrequency = value ?? null; } + + /// Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string UsageDataCollectionPolicyDataReportingFrequency { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).DataReportingFrequency; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).DataReportingFrequency = value ?? null; } + + /// + /// Maximum time for which the functionality of the device will not be hampered for not reporting the usage data. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string UsageDataCollectionPolicyMaxAllowedUnreportedUsageDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).MaxAllowedUnreportedUsageDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal)UsageDataCollectionPolicy).MaxAllowedUnreportedUsageDuration = value ?? null; } + + /// Creates an new instance. + public EdgePolicies() + { + + } + } + public partial interface IEdgePolicies : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Name of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Event Hub where usage will be reported.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string EventHubDetailName { get; set; } + /// Namespace of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Namespace of the Event Hub where usage will be reported.", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string EventHubDetailNamespace { get; set; } + /// SAS token needed to interact with Event Hub. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SAS token needed to interact with Event Hub.", + SerializedName = @"token", + PossibleTypes = new [] { typeof(string) })] + string EventHubDetailToken { get; set; } + /// Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H.", + SerializedName = @"dataCollectionFrequency", + PossibleTypes = new [] { typeof(string) })] + string UsageDataCollectionPolicyDataCollectionFrequency { get; set; } + /// Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H.", + SerializedName = @"dataReportingFrequency", + PossibleTypes = new [] { typeof(string) })] + string UsageDataCollectionPolicyDataReportingFrequency { get; set; } + /// + /// Maximum time for which the functionality of the device will not be hampered for not reporting the usage data. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Maximum time for which the functionality of the device will not be hampered for not reporting the usage data.", + SerializedName = @"maxAllowedUnreportedUsageDuration", + PossibleTypes = new [] { typeof(string) })] + string UsageDataCollectionPolicyMaxAllowedUnreportedUsageDuration { get; set; } + + } + internal partial interface IEdgePoliciesInternal + + { + /// Name of the Event Hub where usage will be reported. + string EventHubDetailName { get; set; } + /// Namespace of the Event Hub where usage will be reported. + string EventHubDetailNamespace { get; set; } + /// SAS token needed to interact with Event Hub. + string EventHubDetailToken { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicy UsageDataCollectionPolicy { get; set; } + /// Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H. + string UsageDataCollectionPolicyDataCollectionFrequency { get; set; } + /// Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H. + string UsageDataCollectionPolicyDataReportingFrequency { get; set; } + /// Details of Event Hub where the usage will be reported. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub UsageDataCollectionPolicyEventHubDetail { get; set; } + /// + /// Maximum time for which the functionality of the device will not be hampered for not reporting the usage data. + /// + string UsageDataCollectionPolicyMaxAllowedUnreportedUsageDuration { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgePolicies.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgePolicies.json.cs new file mode 100644 index 000000000000..a3788ac72b90 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgePolicies.json.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class EdgePolicies + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal EdgePolicies(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_usageDataCollectionPolicy = If( json?.PropertyT("usageDataCollectionPolicy"), out var __jsonUsageDataCollectionPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.EdgeUsageDataCollectionPolicy.FromJson(__jsonUsageDataCollectionPolicy) : UsageDataCollectionPolicy;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgePolicies. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgePolicies. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgePolicies FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new EdgePolicies(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._usageDataCollectionPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._usageDataCollectionPolicy.ToJson(null,serializationMode) : null, "usageDataCollectionPolicy" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataCollectionPolicy.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataCollectionPolicy.cs new file mode 100644 index 000000000000..1fb27c1d1929 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataCollectionPolicy.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class EdgeUsageDataCollectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal + { + + /// Backing field for property. + private string _dataCollectionFrequency; + + /// Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DataCollectionFrequency { get => this._dataCollectionFrequency; set => this._dataCollectionFrequency = value; } + + /// Backing field for property. + private string _dataReportingFrequency; + + /// Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DataReportingFrequency { get => this._dataReportingFrequency; set => this._dataReportingFrequency = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub _eventHubDetail; + + /// Details of Event Hub where the usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub EventHubDetail { get => (this._eventHubDetail = this._eventHubDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.EdgeUsageDataEventHub()); set => this._eventHubDetail = value; } + + /// Name of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EventHubDetailName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHubInternal)EventHubDetail).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHubInternal)EventHubDetail).Name = value ?? null; } + + /// Namespace of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EventHubDetailNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHubInternal)EventHubDetail).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHubInternal)EventHubDetail).Namespace = value ?? null; } + + /// SAS token needed to interact with Event Hub. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EventHubDetailToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHubInternal)EventHubDetail).Token; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHubInternal)EventHubDetail).Token = value ?? null; } + + /// Backing field for property. + private string _maxAllowedUnreportedUsageDuration; + + /// + /// Maximum time for which the functionality of the device will not be hampered for not reporting the usage data. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string MaxAllowedUnreportedUsageDuration { get => this._maxAllowedUnreportedUsageDuration; set => this._maxAllowedUnreportedUsageDuration = value; } + + /// Internal Acessors for EventHubDetail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicyInternal.EventHubDetail { get => (this._eventHubDetail = this._eventHubDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.EdgeUsageDataEventHub()); set { {_eventHubDetail = value;} } } + + /// Creates an new instance. + public EdgeUsageDataCollectionPolicy() + { + + } + } + public partial interface IEdgeUsageDataCollectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H.", + SerializedName = @"dataCollectionFrequency", + PossibleTypes = new [] { typeof(string) })] + string DataCollectionFrequency { get; set; } + /// Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H.", + SerializedName = @"dataReportingFrequency", + PossibleTypes = new [] { typeof(string) })] + string DataReportingFrequency { get; set; } + /// Name of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Event Hub where usage will be reported.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string EventHubDetailName { get; set; } + /// Namespace of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Namespace of the Event Hub where usage will be reported.", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string EventHubDetailNamespace { get; set; } + /// SAS token needed to interact with Event Hub. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SAS token needed to interact with Event Hub.", + SerializedName = @"token", + PossibleTypes = new [] { typeof(string) })] + string EventHubDetailToken { get; set; } + /// + /// Maximum time for which the functionality of the device will not be hampered for not reporting the usage data. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Maximum time for which the functionality of the device will not be hampered for not reporting the usage data.", + SerializedName = @"maxAllowedUnreportedUsageDuration", + PossibleTypes = new [] { typeof(string) })] + string MaxAllowedUnreportedUsageDuration { get; set; } + + } + internal partial interface IEdgeUsageDataCollectionPolicyInternal + + { + /// Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H. + string DataCollectionFrequency { get; set; } + /// Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H. + string DataReportingFrequency { get; set; } + /// Details of Event Hub where the usage will be reported. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub EventHubDetail { get; set; } + /// Name of the Event Hub where usage will be reported. + string EventHubDetailName { get; set; } + /// Namespace of the Event Hub where usage will be reported. + string EventHubDetailNamespace { get; set; } + /// SAS token needed to interact with Event Hub. + string EventHubDetailToken { get; set; } + /// + /// Maximum time for which the functionality of the device will not be hampered for not reporting the usage data. + /// + string MaxAllowedUnreportedUsageDuration { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataCollectionPolicy.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataCollectionPolicy.json.cs new file mode 100644 index 000000000000..5fa1aa2426e3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataCollectionPolicy.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class EdgeUsageDataCollectionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal EdgeUsageDataCollectionPolicy(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_eventHubDetail = If( json?.PropertyT("eventHubDetails"), out var __jsonEventHubDetails) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.EdgeUsageDataEventHub.FromJson(__jsonEventHubDetails) : EventHubDetail;} + {_dataCollectionFrequency = If( json?.PropertyT("dataCollectionFrequency"), out var __jsonDataCollectionFrequency) ? (string)__jsonDataCollectionFrequency : (string)DataCollectionFrequency;} + {_dataReportingFrequency = If( json?.PropertyT("dataReportingFrequency"), out var __jsonDataReportingFrequency) ? (string)__jsonDataReportingFrequency : (string)DataReportingFrequency;} + {_maxAllowedUnreportedUsageDuration = If( json?.PropertyT("maxAllowedUnreportedUsageDuration"), out var __jsonMaxAllowedUnreportedUsageDuration) ? (string)__jsonMaxAllowedUnreportedUsageDuration : (string)MaxAllowedUnreportedUsageDuration;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataCollectionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new EdgeUsageDataCollectionPolicy(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._eventHubDetail ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._eventHubDetail.ToJson(null,serializationMode) : null, "eventHubDetails" ,container.Add ); + AddIf( null != (((object)this._dataCollectionFrequency)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._dataCollectionFrequency.ToString()) : null, "dataCollectionFrequency" ,container.Add ); + AddIf( null != (((object)this._dataReportingFrequency)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._dataReportingFrequency.ToString()) : null, "dataReportingFrequency" ,container.Add ); + AddIf( null != (((object)this._maxAllowedUnreportedUsageDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._maxAllowedUnreportedUsageDuration.ToString()) : null, "maxAllowedUnreportedUsageDuration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataEventHub.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataEventHub.cs new file mode 100644 index 000000000000..da36f2040064 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataEventHub.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class EdgeUsageDataEventHub : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHubInternal + { + + /// Backing field for property. + private string _name; + + /// Name of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespace; + + /// Namespace of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Namespace { get => this._namespace; set => this._namespace = value; } + + /// Backing field for property. + private string _token; + + /// SAS token needed to interact with Event Hub. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Token { get => this._token; set => this._token = value; } + + /// Creates an new instance. + public EdgeUsageDataEventHub() + { + + } + } + public partial interface IEdgeUsageDataEventHub : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Name of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Event Hub where usage will be reported.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Namespace of the Event Hub where usage will be reported. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Namespace of the Event Hub where usage will be reported.", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string Namespace { get; set; } + /// SAS token needed to interact with Event Hub. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SAS token needed to interact with Event Hub.", + SerializedName = @"token", + PossibleTypes = new [] { typeof(string) })] + string Token { get; set; } + + } + internal partial interface IEdgeUsageDataEventHubInternal + + { + /// Name of the Event Hub where usage will be reported. + string Name { get; set; } + /// Namespace of the Event Hub where usage will be reported. + string Namespace { get; set; } + /// SAS token needed to interact with Event Hub. + string Token { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataEventHub.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataEventHub.json.cs new file mode 100644 index 000000000000..1d1e61accf5c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/EdgeUsageDataEventHub.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class EdgeUsageDataEventHub + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal EdgeUsageDataEventHub(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)Namespace;} + {_token = If( json?.PropertyT("token"), out var __jsonToken) ? (string)__jsonToken : (string)Token;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEdgeUsageDataEventHub FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new EdgeUsageDataEventHub(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._namespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._namespace.ToString()) : null, "namespace" ,container.Add ); + AddIf( null != (((object)this._token)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._token.ToString()) : null, "token" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/EntityNameAvailabilityCheckOutput.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/EntityNameAvailabilityCheckOutput.cs new file mode 100644 index 000000000000..846e7071911a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/EntityNameAvailabilityCheckOutput.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The response from the check name availability request. + public partial class EntityNameAvailabilityCheckOutput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEntityNameAvailabilityCheckOutput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEntityNameAvailabilityCheckOutputInternal + { + + /// Backing field for property. + private string _message; + + /// Specifies the detailed reason if the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private bool _nameAvailable; + + /// Specifies if the name is available. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool NameAvailable { get => this._nameAvailable; set => this._nameAvailable = value; } + + /// Backing field for property. + private string _reason; + + /// Specifies the reason if the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Reason { get => this._reason; set => this._reason = value; } + + /// Creates an new instance. + public EntityNameAvailabilityCheckOutput() + { + + } + } + /// The response from the check name availability request. + public partial interface IEntityNameAvailabilityCheckOutput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Specifies the detailed reason if the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the detailed reason if the name is not available.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Specifies if the name is available. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Specifies if the name is available.", + SerializedName = @"nameAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool NameAvailable { get; set; } + /// Specifies the reason if the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the reason if the name is not available.", + SerializedName = @"reason", + PossibleTypes = new [] { typeof(string) })] + string Reason { get; set; } + + } + /// The response from the check name availability request. + internal partial interface IEntityNameAvailabilityCheckOutputInternal + + { + /// Specifies the detailed reason if the name is not available. + string Message { get; set; } + /// Specifies if the name is available. + bool NameAvailable { get; set; } + /// Specifies the reason if the name is not available. + string Reason { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/EntityNameAvailabilityCheckOutput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/EntityNameAvailabilityCheckOutput.json.cs new file mode 100644 index 000000000000..d43c44c78515 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/EntityNameAvailabilityCheckOutput.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The response from the check name availability request. + public partial class EntityNameAvailabilityCheckOutput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal EntityNameAvailabilityCheckOutput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool)__jsonNameAvailable : NameAvailable;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEntityNameAvailabilityCheckOutput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEntityNameAvailabilityCheckOutput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IEntityNameAvailabilityCheckOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new EntityNameAvailabilityCheckOutput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._nameAvailable), "nameAvailable" ,container.Add ); + AddIf( null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPreset.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPreset.cs new file mode 100644 index 000000000000..210426180914 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPreset.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces + /// present. + /// + public partial class FaceDetectorPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPreset, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset __preset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType? _blurType; + + /// Blur type + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType? BlurType { get => this._blurType; set => this._blurType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptions _experimentalOption; + + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptions ExperimentalOption { get => (this._experimentalOption = this._experimentalOption ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.FaceDetectorPresetExperimentalOptions()); set => this._experimentalOption = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode? _mode; + + /// + /// This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates + /// a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person + /// are assigned the same ID. 2) Combined - Additionally redacts(blurs) detected faces. 3) Redact - This enables a 2-pass + /// process, allowing for selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze + /// pass, along with the source video, and a user-selected subset of IDs that require redaction. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode? Mode { get => this._mode; set => this._mode = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__preset).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__preset).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution? _resolution; + + /// + /// Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will + /// keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to + /// standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. + /// For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce + /// the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics + /// for details). However, faces that end up being too small in the resized video may not be detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution? Resolution { get => this._resolution; set => this._resolution = value; } + + /// Creates an new instance. + public FaceDetectorPreset() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__preset), __preset); + await eventListener.AssertObjectIsValid(nameof(__preset), __preset); + } + } + /// Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces + /// present. + public partial interface IFaceDetectorPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset + { + /// Blur type + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Blur type", + SerializedName = @"blurType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType? BlurType { get; set; } + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Dictionary containing key value pairs for parameters not exposed in the preset itself", + SerializedName = @"experimentalOptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptions) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptions ExperimentalOption { get; set; } + /// + /// This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates + /// a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person + /// are assigned the same ID. 2) Combined - Additionally redacts(blurs) detected faces. 3) Redact - This enables a 2-pass + /// process, allowing for selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze + /// pass, along with the source video, and a user-selected subset of IDs that require redaction. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person are assigned the same ID. 2) Combined - Additionally redacts(blurs) detected faces. 3) Redact - This enables a 2-pass process, allowing for selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze pass, along with the source video, and a user-selected subset of IDs that require redaction.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode? Mode { get; set; } + /// + /// Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will + /// keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to + /// standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. + /// For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce + /// the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics + /// for details). However, faces that end up being too small in the resized video may not be detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the maximum resolution at which your video is analyzed. The default behavior is ""SourceResolution,"" which will keep the input video at its original resolution when analyzed. Using ""StandardDefinition"" will resize input videos to standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to ""StandardDefinition"" will reduce the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics for details). However, faces that end up being too small in the resized video may not be detected.", + SerializedName = @"resolution", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution? Resolution { get; set; } + + } + /// Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces + /// present. + internal partial interface IFaceDetectorPresetInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal + { + /// Blur type + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType? BlurType { get; set; } + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptions ExperimentalOption { get; set; } + /// + /// This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates + /// a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person + /// are assigned the same ID. 2) Combined - Additionally redacts(blurs) detected faces. 3) Redact - This enables a 2-pass + /// process, allowing for selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze + /// pass, along with the source video, and a user-selected subset of IDs that require redaction. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode? Mode { get; set; } + /// + /// Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will + /// keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to + /// standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. + /// For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce + /// the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics + /// for details). However, faces that end up being too small in the resized video may not be detected. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution? Resolution { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPreset.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPreset.json.cs new file mode 100644 index 000000000000..1e758ca55194 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPreset.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces + /// present. + /// + public partial class FaceDetectorPreset + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal FaceDetectorPreset(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __preset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset(json); + {_resolution = If( json?.PropertyT("resolution"), out var __jsonResolution) ? (string)__jsonResolution : (string)Resolution;} + {_mode = If( json?.PropertyT("mode"), out var __jsonMode) ? (string)__jsonMode : (string)Mode;} + {_blurType = If( json?.PropertyT("blurType"), out var __jsonBlurType) ? (string)__jsonBlurType : (string)BlurType;} + {_experimentalOption = If( json?.PropertyT("experimentalOptions"), out var __jsonExperimentalOptions) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.FaceDetectorPresetExperimentalOptions.FromJson(__jsonExperimentalOptions) : ExperimentalOption;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPreset. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPreset. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPreset FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new FaceDetectorPreset(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __preset?.ToJson(container, serializationMode); + AddIf( null != (((object)this._resolution)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._resolution.ToString()) : null, "resolution" ,container.Add ); + AddIf( null != (((object)this._mode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._mode.ToString()) : null, "mode" ,container.Add ); + AddIf( null != (((object)this._blurType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._blurType.ToString()) : null, "blurType" ,container.Add ); + AddIf( null != this._experimentalOption ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._experimentalOption.ToJson(null,serializationMode) : null, "experimentalOptions" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.cs new file mode 100644 index 000000000000..433594f85074 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + public partial class FaceDetectorPresetExperimentalOptions : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptions, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptionsInternal + { + + /// Creates an new instance. + public FaceDetectorPresetExperimentalOptions() + { + + } + } + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + public partial interface IFaceDetectorPresetExperimentalOptions : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + + } + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + internal partial interface IFaceDetectorPresetExperimentalOptionsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.dictionary.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.dictionary.cs new file mode 100644 index 000000000000..4d7108a3ff18 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class FaceDetectorPresetExperimentalOptions : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.FaceDetectorPresetExperimentalOptions source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.json.cs new file mode 100644 index 000000000000..88b8d7db14c3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/FaceDetectorPresetExperimentalOptions.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + public partial class FaceDetectorPresetExperimentalOptions + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + /// + internal FaceDetectorPresetExperimentalOptions(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptions. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptions. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFaceDetectorPresetExperimentalOptions FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new FaceDetectorPresetExperimentalOptions(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Filters.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Filters.cs new file mode 100644 index 000000000000..81b3a0ee77ef --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Filters.cs @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input media + /// before encoding. + /// + public partial class Filters : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFilters, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle _crop; + + /// The parameters for the rectangular window with which to crop the input video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle Crop { get => (this._crop = this._crop ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Rectangle()); set => this._crop = value; } + + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropHeight { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Crop).Height; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Crop).Height = value ?? null; } + + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropLeft { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Crop).Left; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Crop).Left = value ?? null; } + + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropTop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Crop).Top; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Crop).Top = value ?? null; } + + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropWidth { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Crop).Width; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Crop).Width = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace _deinterlace; + + /// The de-interlacing settings. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace Deinterlace { get => (this._deinterlace = this._deinterlace ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Deinterlace()); set => this._deinterlace = value; } + + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? DeinterlaceMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlaceInternal)Deinterlace).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlaceInternal)Deinterlace).Mode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode)""); } + + /// The field parity for de-interlacing, defaults to Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? DeinterlaceParity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlaceInternal)Deinterlace).Parity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlaceInternal)Deinterlace).Parity = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity)""); } + + /// Internal Acessors for Crop + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal.Crop { get => (this._crop = this._crop ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Rectangle()); set { {_crop = value;} } } + + /// Internal Acessors for Deinterlace + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal.Deinterlace { get => (this._deinterlace = this._deinterlace ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Deinterlace()); set { {_deinterlace = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay[] _overlay; + + /// + /// The properties of overlays to be applied to the input video. These could be audio, image or video overlays. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay[] Overlay { get => this._overlay; set => this._overlay = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation? _rotation; + + /// + /// The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation? Rotation { get => this._rotation; set => this._rotation = value; } + + /// Creates an new instance. + public Filters() + { + + } + } + /// Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input media + /// before encoding. + public partial interface IFilters : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"height", + PossibleTypes = new [] { typeof(string) })] + string CropHeight { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"left", + PossibleTypes = new [] { typeof(string) })] + string CropLeft { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"top", + PossibleTypes = new [] { typeof(string) })] + string CropTop { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"width", + PossibleTypes = new [] { typeof(string) })] + string CropWidth { get; set; } + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The deinterlacing mode. Defaults to AutoPixelAdaptive.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? DeinterlaceMode { get; set; } + /// The field parity for de-interlacing, defaults to Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The field parity for de-interlacing, defaults to Auto.", + SerializedName = @"parity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? DeinterlaceParity { get; set; } + /// + /// The properties of overlays to be applied to the input video. These could be audio, image or video overlays. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The properties of overlays to be applied to the input video. These could be audio, image or video overlays.", + SerializedName = @"overlays", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioOverlay) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay[] Overlay { get; set; } + /// + /// The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto", + SerializedName = @"rotation", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation? Rotation { get; set; } + + } + /// Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input media + /// before encoding. + internal partial interface IFiltersInternal + + { + /// The parameters for the rectangular window with which to crop the input video. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle Crop { get; set; } + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string CropHeight { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + string CropLeft { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + string CropTop { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string CropWidth { get; set; } + /// The de-interlacing settings. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace Deinterlace { get; set; } + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? DeinterlaceMode { get; set; } + /// The field parity for de-interlacing, defaults to Auto. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? DeinterlaceParity { get; set; } + /// + /// The properties of overlays to be applied to the input video. These could be audio, image or video overlays. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay[] Overlay { get; set; } + /// + /// The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation? Rotation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Filters.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Filters.json.cs new file mode 100644 index 000000000000..173504343d1c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Filters.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input media + /// before encoding. + /// + public partial class Filters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Filters(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deinterlace = If( json?.PropertyT("deinterlace"), out var __jsonDeinterlace) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Deinterlace.FromJson(__jsonDeinterlace) : Deinterlace;} + {_crop = If( json?.PropertyT("crop"), out var __jsonCrop) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Rectangle.FromJson(__jsonCrop) : Crop;} + {_rotation = If( json?.PropertyT("rotation"), out var __jsonRotation) ? (string)__jsonRotation : (string)Rotation;} + {_overlay = If( json?.PropertyT("overlays"), out var __jsonOverlays) ? If( __jsonOverlays as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Overlay.FromJson(__u) )) ))() : null : Overlay;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFilters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFilters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFilters FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Filters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._deinterlace ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._deinterlace.ToJson(null,serializationMode) : null, "deinterlace" ,container.Add ); + AddIf( null != this._crop ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._crop.ToJson(null,serializationMode) : null, "crop" ,container.Add ); + AddIf( null != (((object)this._rotation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._rotation.ToString()) : null, "rotation" ,container.Add ); + if (null != this._overlay) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._overlay ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("overlays",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Format.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Format.cs new file mode 100644 index 000000000000..54d5eb4096fe --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Format.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Base class for output. + public partial class Format : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal + { + + /// Backing field for property. + private string _filenamePattern; + + /// + /// The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} + /// - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) + /// of the input video file is less than 32 characters long, the base name of input video files will be used. If the length + /// of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total + /// length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} + /// - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + /// thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros + /// will be collapsed and removed from the filename. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FilenamePattern { get => this._filenamePattern; set => this._filenamePattern = value; } + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public Format() + { + + } + } + /// Base class for output. + public partial interface IFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} + /// - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) + /// of the input video file is less than 32 characters long, the base name of input video files will be used. If the length + /// of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total + /// length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} + /// - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + /// thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros + /// will be collapsed and removed from the filename. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename.", + SerializedName = @"filenamePattern", + PossibleTypes = new [] { typeof(string) })] + string FilenamePattern { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base class for output. + internal partial interface IFormatInternal + + { + /// + /// The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} + /// - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) + /// of the input video file is less than 32 characters long, the base name of input video files will be used. If the length + /// of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total + /// length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} + /// - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + /// thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros + /// will be collapsed and removed from the filename. + /// + string FilenamePattern { get; set; } + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Format.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Format.json.cs new file mode 100644 index 000000000000..cf8128b8ae79 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Format.json.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Base class for output. + public partial class Format + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Format(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + {_filenamePattern = If( json?.PropertyT("filenamePattern"), out var __jsonFilenamePattern) ? (string)__jsonFilenamePattern : (string)FilenamePattern;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.ImageFormat": + { + return new ImageFormat(json); + } + case "#Microsoft.Media.JpgFormat": + { + return new JpgFormat(json); + } + case "#Microsoft.Media.PngFormat": + { + return new PngFormat(json); + } + case "#Microsoft.Media.MultiBitrateFormat": + { + return new MultiBitrateFormat(json); + } + case "#Microsoft.Media.Mp4Format": + { + return new Mp4Format(json); + } + case "#Microsoft.Media.TransportStreamFormat": + { + return new TransportStreamFormat(json); + } + } + return new Format(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AddIf( null != (((object)this._filenamePattern)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._filenamePattern.ToString()) : null, "filenamePattern" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/FromAllInputFile.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/FromAllInputFile.cs new file mode 100644 index 000000000000..bc9e6b91a4c2 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/FromAllInputFile.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// An InputDefinition that looks across all of the files provided to select tracks specified by the IncludedTracks property. + /// Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to allow selection of a single track across a + /// set of input files. + /// + public partial class FromAllInputFile : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromAllInputFile, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromAllInputFileInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition __inputDefinition = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.InputDefinition(); + + /// + /// The list of TrackDescriptors which define the metadata and selection of tracks in the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor[] IncludedTrack { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).IncludedTrack; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).IncludedTrack = value ?? null /* arrayOf */; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).OdataType = value ; } + + /// Creates an new instance. + public FromAllInputFile() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__inputDefinition), __inputDefinition); + await eventListener.AssertObjectIsValid(nameof(__inputDefinition), __inputDefinition); + } + } + /// An InputDefinition that looks across all of the files provided to select tracks specified by the IncludedTracks property. + /// Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to allow selection of a single track across a + /// set of input files. + public partial interface IFromAllInputFile : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition + { + + } + /// An InputDefinition that looks across all of the files provided to select tracks specified by the IncludedTracks property. + /// Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to allow selection of a single track across a + /// set of input files. + internal partial interface IFromAllInputFileInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/FromAllInputFile.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/FromAllInputFile.json.cs new file mode 100644 index 000000000000..0eb4412ef059 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/FromAllInputFile.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// An InputDefinition that looks across all of the files provided to select tracks specified by the IncludedTracks property. + /// Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to allow selection of a single track across a + /// set of input files. + /// + public partial class FromAllInputFile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal FromAllInputFile(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __inputDefinition = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.InputDefinition(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromAllInputFile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromAllInputFile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromAllInputFile FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new FromAllInputFile(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __inputDefinition?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/FromEachInputFile.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/FromEachInputFile.cs new file mode 100644 index 000000000000..311afdbe8c0b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/FromEachInputFile.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// 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. + /// + public partial class FromEachInputFile : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromEachInputFile, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromEachInputFileInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition __inputDefinition = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.InputDefinition(); + + /// + /// The list of TrackDescriptors which define the metadata and selection of tracks in the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor[] IncludedTrack { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).IncludedTrack; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).IncludedTrack = value ?? null /* arrayOf */; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).OdataType = value ; } + + /// Creates an new instance. + public FromEachInputFile() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__inputDefinition), __inputDefinition); + await eventListener.AssertObjectIsValid(nameof(__inputDefinition), __inputDefinition); + } + } + /// 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. + public partial interface IFromEachInputFile : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition + { + + } + /// 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. + internal partial interface IFromEachInputFileInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/FromEachInputFile.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/FromEachInputFile.json.cs new file mode 100644 index 000000000000..ece845f24087 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/FromEachInputFile.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// 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. + /// + public partial class FromEachInputFile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal FromEachInputFile(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __inputDefinition = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.InputDefinition(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromEachInputFile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromEachInputFile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromEachInputFile FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new FromEachInputFile(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __inputDefinition?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Layer.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Layer.cs new file mode 100644 index 000000000000..587e73dd6dd2 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Layer.cs @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video + /// codec. + /// + public partial class H264Layer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264LayerInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayer __videoLayer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.VideoLayer(); + + /// + /// Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on + /// whenever the video profile permits its use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public bool? AdaptiveBFrame { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).AdaptiveBFrame; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).AdaptiveBFrame = value ?? default(bool); } + + /// + /// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number + /// based on the video profile and level. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? BFrame { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).BFrame; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).BFrame = value ?? default(int); } + + /// + /// The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required + /// field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int Bitrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).Bitrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).Bitrate = value ; } + + /// Backing field for property. + private global::System.TimeSpan? _bufferWindow; + + /// + /// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. + /// The default is 5 seconds (for example, PT5S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? BufferWindow { get => this._bufferWindow; set => this._bufferWindow = value; } + + /// Backing field for property. + private float? _crf; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public float? Crf { get => this._crf; set => this._crf = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode? _entropyMode; + + /// + /// The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the + /// profile and level. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode? EntropyMode { get => this._entropyMode; set => this._entropyMode = value; } + + /// + /// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N + /// are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints + /// on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate + /// as the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string FrameRate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).FrameRate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).FrameRate = value ?? null; } + + /// + /// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For + /// example 50% means the output video has half as many pixels in height as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Height { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__videoLayer).Height; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__videoLayer).Height = value ?? null; } + + /// + /// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming + /// the output file. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__videoLayer).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__videoLayer).Label = value ?? null; } + + /// Backing field for property. + private string _level; + + /// + /// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, + /// the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Level { get => this._level; set => this._level = value; } + + /// + /// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults + /// to the same value as bitrate. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? MaxBitrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).MaxBitrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).MaxBitrate = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile? _profile; + + /// We currently support Baseline, Main, High, High422, High444. Default is Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile? Profile { get => this._profile; set => this._profile = value; } + + /// Backing field for property. + private int? _referenceFrame; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? ReferenceFrame { get => this._referenceFrame; set => this._referenceFrame = value; } + + /// + /// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder + /// will use a single slice for each frame. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? Slice { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).Slice; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal)__videoLayer).Slice = value ?? default(int); } + + /// + /// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example + /// 50% means the output video has half as many pixels in width as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Width { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__videoLayer).Width; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__videoLayer).Width = value ?? null; } + + /// Creates an new instance. + public H264Layer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__videoLayer), __videoLayer); + await eventListener.AssertObjectIsValid(nameof(__videoLayer), __videoLayer); + } + } + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video + /// codec. + public partial interface IH264Layer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayer + { + /// + /// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. + /// The default is 5 seconds (for example, PT5S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S).", + SerializedName = @"bufferWindow", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? BufferWindow { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"crf", + PossibleTypes = new [] { typeof(float) })] + float? Crf { get; set; } + /// + /// The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the + /// profile and level. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.", + SerializedName = @"entropyMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode? EntropyMode { get; set; } + /// + /// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, + /// the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer.", + SerializedName = @"level", + PossibleTypes = new [] { typeof(string) })] + string Level { get; set; } + /// We currently support Baseline, Main, High, High422, High444. Default is Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"We currently support Baseline, Main, High, High422, High444. Default is Auto.", + SerializedName = @"profile", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile? Profile { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"referenceFrames", + PossibleTypes = new [] { typeof(int) })] + int? ReferenceFrame { get; set; } + + } + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video + /// codec. + internal partial interface IH264LayerInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal + { + /// + /// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. + /// The default is 5 seconds (for example, PT5S). + /// + global::System.TimeSpan? BufferWindow { get; set; } + /// + /// 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. + /// + float? Crf { get; set; } + /// + /// The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the + /// profile and level. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode? EntropyMode { get; set; } + /// + /// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, + /// the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. + /// + string Level { get; set; } + /// We currently support Baseline, Main, High, High422, High444. Default is Auto. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile? Profile { get; set; } + /// + /// 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. + /// + int? ReferenceFrame { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Layer.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Layer.json.cs new file mode 100644 index 000000000000..3d2705dba894 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Layer.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video + /// codec. + /// + public partial class H264Layer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new H264Layer(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal H264Layer(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __videoLayer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.VideoLayer(json); + {_profile = If( json?.PropertyT("profile"), out var __jsonProfile) ? (string)__jsonProfile : (string)Profile;} + {_level = If( json?.PropertyT("level"), out var __jsonLevel) ? (string)__jsonLevel : (string)Level;} + {_bufferWindow = If( json?.PropertyT("bufferWindow"), out var __jsonBufferWindow) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonBufferWindow ) : BufferWindow;} + {_crf = If( json?.PropertyT("crf"), out var __jsonCrf) ? (float?)__jsonCrf : Crf;} + {_referenceFrame = If( json?.PropertyT("referenceFrames"), out var __jsonReferenceFrames) ? (int?)__jsonReferenceFrames : ReferenceFrame;} + {_entropyMode = If( json?.PropertyT("entropyMode"), out var __jsonEntropyMode) ? (string)__jsonEntropyMode : (string)EntropyMode;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __videoLayer?.ToJson(container, serializationMode); + AddIf( null != (((object)this._profile)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._profile.ToString()) : null, "profile" ,container.Add ); + AddIf( null != (((object)this._level)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._level.ToString()) : null, "level" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._bufferWindow ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._bufferWindow)): null), "bufferWindow" ,container.Add ); + AddIf( null != this._crf ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((float)this._crf) : null, "crf" ,container.Add ); + AddIf( null != this._referenceFrame ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._referenceFrame) : null, "referenceFrames" ,container.Add ); + AddIf( null != (((object)this._entropyMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._entropyMode.ToString()) : null, "entropyMode" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Video.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Video.cs new file mode 100644 index 000000000000..d6caf5fc74a1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Video.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes all the properties for encoding a video with the H.264 codec. + public partial class H264Video : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Video, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264VideoInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo __video = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Video(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity? _complexity; + + /// + /// Tells the encoder how to choose its encoding settings. The default value is Balanced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity? Complexity { get => this._complexity; set => this._complexity = value; } + + /// + /// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 + /// format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the + /// KeyFrameInterval value will follow the input source setting. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? KeyFrameInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).KeyFrameInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).KeyFrameInterval = value ?? default(global::System.TimeSpan); } + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).Label = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer[] _layer; + + /// The collection of output H.264 layers to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer[] Layer { get => this._layer; set => this._layer = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode? _rateControlMode; + + /// The video rate control mode + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode? RateControlMode { get => this._rateControlMode; set => this._rateControlMode = value; } + + /// Backing field for property. + private bool? _sceneChangeDetection; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? SceneChangeDetection { get => this._sceneChangeDetection; set => this._sceneChangeDetection = value; } + + /// + /// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).StretchMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).StretchMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode)""); } + + /// The Video Sync Mode + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode? SyncMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).SyncMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).SyncMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode)""); } + + /// Creates an new instance. + public H264Video() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__video), __video); + await eventListener.AssertObjectIsValid(nameof(__video), __video); + } + } + /// Describes all the properties for encoding a video with the H.264 codec. + public partial interface IH264Video : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo + { + /// + /// Tells the encoder how to choose its encoding settings. The default value is Balanced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tells the encoder how to choose its encoding settings. The default value is Balanced.", + SerializedName = @"complexity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity? Complexity { get; set; } + /// The collection of output H.264 layers to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The collection of output H.264 layers to be produced by the encoder.", + SerializedName = @"layers", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer[] Layer { get; set; } + /// The video rate control mode + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The video rate control mode", + SerializedName = @"rateControlMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode? RateControlMode { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"sceneChangeDetection", + PossibleTypes = new [] { typeof(bool) })] + bool? SceneChangeDetection { get; set; } + + } + /// Describes all the properties for encoding a video with the H.264 codec. + internal partial interface IH264VideoInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal + { + /// + /// Tells the encoder how to choose its encoding settings. The default value is Balanced. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity? Complexity { get; set; } + /// The collection of output H.264 layers to be produced by the encoder. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer[] Layer { get; set; } + /// The video rate control mode + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode? RateControlMode { get; set; } + /// + /// 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. + /// + bool? SceneChangeDetection { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Video.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Video.json.cs new file mode 100644 index 000000000000..1c4fc9ee0f88 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H264Video.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes all the properties for encoding a video with the H.264 codec. + public partial class H264Video + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Video. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Video. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Video FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new H264Video(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal H264Video(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __video = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Video(json); + {_complexity = If( json?.PropertyT("complexity"), out var __jsonComplexity) ? (string)__jsonComplexity : (string)Complexity;} + {_layer = If( json?.PropertyT("layers"), out var __jsonLayers) ? If( __jsonLayers as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Layer) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.H264Layer.FromJson(__u) )) ))() : null : Layer;} + {_rateControlMode = If( json?.PropertyT("rateControlMode"), out var __jsonRateControlMode) ? (string)__jsonRateControlMode : (string)RateControlMode;} + {_sceneChangeDetection = If( json?.PropertyT("sceneChangeDetection"), out var __jsonSceneChangeDetection) ? (bool?)__jsonSceneChangeDetection : SceneChangeDetection;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __video?.ToJson(container, serializationMode); + AddIf( null != (((object)this._complexity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._complexity.ToString()) : null, "complexity" ,container.Add ); + if (null != this._layer) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._layer ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("layers",__w); + } + AddIf( null != (((object)this._rateControlMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._rateControlMode.ToString()) : null, "rateControlMode" ,container.Add ); + AddIf( null != this._sceneChangeDetection ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._sceneChangeDetection) : null, "sceneChangeDetection" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Layer.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Layer.cs new file mode 100644 index 000000000000..9e092746b592 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Layer.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 video + /// codec. + /// + public partial class H265Layer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265LayerInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayer __h265VideoLayer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.H265VideoLayer(); + + /// + /// Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will + /// turn it on whenever the video profile permits its use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public bool? AdaptiveBFrame { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).AdaptiveBFrame; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).AdaptiveBFrame = value ?? default(bool); } + + /// + /// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number + /// based on the video profile and level. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? BFrame { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).BFrame; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).BFrame = value ?? default(int); } + + /// + /// The average bitrate in bits per second at which to encode the input video when generating this layer. For example: a target + /// bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a required field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int Bitrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).Bitrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).Bitrate = value ; } + + /// Backing field for property. + private global::System.TimeSpan? _bufferWindow; + + /// + /// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. + /// The default is 5 seconds (for example, PT5S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? BufferWindow { get => this._bufferWindow; set => this._bufferWindow = value; } + + /// Backing field for property. + private float? _crf; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public float? Crf { get => this._crf; set => this._crf = value; } + + /// + /// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N + /// are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints + /// on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate + /// as the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string FrameRate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).FrameRate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).FrameRate = value ?? null; } + + /// + /// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For + /// example 50% means the output video has half as many pixels in height as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Height { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__h265VideoLayer).Height; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__h265VideoLayer).Height = value ?? null; } + + /// + /// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming + /// the output file. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__h265VideoLayer).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__h265VideoLayer).Label = value ?? null; } + + /// Backing field for property. + private string _level; + + /// + /// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.265 profile. If not specified, + /// the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Level { get => this._level; set => this._level = value; } + + /// + /// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults + /// to the same value as bitrate. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? MaxBitrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).MaxBitrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).MaxBitrate = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile? _profile; + + /// We currently support Main. Default is Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile? Profile { get => this._profile; set => this._profile = value; } + + /// Backing field for property. + private int? _referenceFrame; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? ReferenceFrame { get => this._referenceFrame; set => this._referenceFrame = value; } + + /// + /// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder + /// will use a single slice for each frame. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? Slice { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).Slice; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal)__h265VideoLayer).Slice = value ?? default(int); } + + /// + /// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example + /// 50% means the output video has half as many pixels in width as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Width { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__h265VideoLayer).Width; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__h265VideoLayer).Width = value ?? null; } + + /// Creates an new instance. + public H265Layer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__h265VideoLayer), __h265VideoLayer); + await eventListener.AssertObjectIsValid(nameof(__h265VideoLayer), __h265VideoLayer); + } + } + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 video + /// codec. + public partial interface IH265Layer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayer + { + /// + /// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. + /// The default is 5 seconds (for example, PT5S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S).", + SerializedName = @"bufferWindow", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? BufferWindow { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"crf", + PossibleTypes = new [] { typeof(float) })] + float? Crf { get; set; } + /// + /// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.265 profile. If not specified, + /// the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.265 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer.", + SerializedName = @"level", + PossibleTypes = new [] { typeof(string) })] + string Level { get; set; } + /// We currently support Main. Default is Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"We currently support Main. Default is Auto.", + SerializedName = @"profile", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile? Profile { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"referenceFrames", + PossibleTypes = new [] { typeof(int) })] + int? ReferenceFrame { get; set; } + + } + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 video + /// codec. + internal partial interface IH265LayerInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal + { + /// + /// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. + /// The default is 5 seconds (for example, PT5S). + /// + global::System.TimeSpan? BufferWindow { get; set; } + /// + /// 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. + /// + float? Crf { get; set; } + /// + /// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.265 profile. If not specified, + /// the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. + /// + string Level { get; set; } + /// We currently support Main. Default is Auto. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile? Profile { get; set; } + /// + /// 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. + /// + int? ReferenceFrame { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Layer.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Layer.json.cs new file mode 100644 index 000000000000..7ac93073dadc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Layer.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 video + /// codec. + /// + public partial class H265Layer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new H265Layer(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal H265Layer(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __h265VideoLayer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.H265VideoLayer(json); + {_profile = If( json?.PropertyT("profile"), out var __jsonProfile) ? (string)__jsonProfile : (string)Profile;} + {_level = If( json?.PropertyT("level"), out var __jsonLevel) ? (string)__jsonLevel : (string)Level;} + {_bufferWindow = If( json?.PropertyT("bufferWindow"), out var __jsonBufferWindow) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonBufferWindow ) : BufferWindow;} + {_crf = If( json?.PropertyT("crf"), out var __jsonCrf) ? (float?)__jsonCrf : Crf;} + {_referenceFrame = If( json?.PropertyT("referenceFrames"), out var __jsonReferenceFrames) ? (int?)__jsonReferenceFrames : ReferenceFrame;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __h265VideoLayer?.ToJson(container, serializationMode); + AddIf( null != (((object)this._profile)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._profile.ToString()) : null, "profile" ,container.Add ); + AddIf( null != (((object)this._level)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._level.ToString()) : null, "level" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._bufferWindow ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._bufferWindow)): null), "bufferWindow" ,container.Add ); + AddIf( null != this._crf ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((float)this._crf) : null, "crf" ,container.Add ); + AddIf( null != this._referenceFrame ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._referenceFrame) : null, "referenceFrames" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Video.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Video.cs new file mode 100644 index 000000000000..9aee4d6c874b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Video.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes all the properties for encoding a video with the H.265 codec. + public partial class H265Video : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Video, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo __video = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Video(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity? _complexity; + + /// + /// Tells the encoder how to choose its encoding settings. Quality will provide for a higher compression ratio but at a higher + /// cost and longer compute time. Speed will produce a relatively larger file but is faster and more economical. The default + /// value is Balanced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity? Complexity { get => this._complexity; set => this._complexity = value; } + + /// + /// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 + /// format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the + /// KeyFrameInterval value will follow the input source setting. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? KeyFrameInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).KeyFrameInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).KeyFrameInterval = value ?? default(global::System.TimeSpan); } + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).Label = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer[] _layer; + + /// The collection of output H.265 layers to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer[] Layer { get => this._layer; set => this._layer = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).OdataType = value ; } + + /// Backing field for property. + private bool? _sceneChangeDetection; + + /// + /// Specifies 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? SceneChangeDetection { get => this._sceneChangeDetection; set => this._sceneChangeDetection = value; } + + /// + /// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).StretchMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).StretchMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode)""); } + + /// The Video Sync Mode + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode? SyncMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).SyncMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).SyncMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode)""); } + + /// Creates an new instance. + public H265Video() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__video), __video); + await eventListener.AssertObjectIsValid(nameof(__video), __video); + } + } + /// Describes all the properties for encoding a video with the H.265 codec. + public partial interface IH265Video : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo + { + /// + /// Tells the encoder how to choose its encoding settings. Quality will provide for a higher compression ratio but at a higher + /// cost and longer compute time. Speed will produce a relatively larger file but is faster and more economical. The default + /// value is Balanced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tells the encoder how to choose its encoding settings. Quality will provide for a higher compression ratio but at a higher cost and longer compute time. Speed will produce a relatively larger file but is faster and more economical. The default value is Balanced.", + SerializedName = @"complexity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity? Complexity { get; set; } + /// The collection of output H.265 layers to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The collection of output H.265 layers to be produced by the encoder.", + SerializedName = @"layers", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer[] Layer { get; set; } + /// + /// Specifies 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies 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.", + SerializedName = @"sceneChangeDetection", + PossibleTypes = new [] { typeof(bool) })] + bool? SceneChangeDetection { get; set; } + + } + /// Describes all the properties for encoding a video with the H.265 codec. + internal partial interface IH265VideoInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal + { + /// + /// Tells the encoder how to choose its encoding settings. Quality will provide for a higher compression ratio but at a higher + /// cost and longer compute time. Speed will produce a relatively larger file but is faster and more economical. The default + /// value is Balanced. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity? Complexity { get; set; } + /// The collection of output H.265 layers to be produced by the encoder. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer[] Layer { get; set; } + /// + /// Specifies 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. + /// + bool? SceneChangeDetection { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Video.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Video.json.cs new file mode 100644 index 000000000000..2eda1198932f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265Video.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes all the properties for encoding a video with the H.265 codec. + public partial class H265Video + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Video. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Video. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Video FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new H265Video(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal H265Video(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __video = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Video(json); + {_sceneChangeDetection = If( json?.PropertyT("sceneChangeDetection"), out var __jsonSceneChangeDetection) ? (bool?)__jsonSceneChangeDetection : SceneChangeDetection;} + {_complexity = If( json?.PropertyT("complexity"), out var __jsonComplexity) ? (string)__jsonComplexity : (string)Complexity;} + {_layer = If( json?.PropertyT("layers"), out var __jsonLayers) ? If( __jsonLayers as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Layer) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.H265Layer.FromJson(__u) )) ))() : null : Layer;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __video?.ToJson(container, serializationMode); + AddIf( null != this._sceneChangeDetection ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._sceneChangeDetection) : null, "sceneChangeDetection" ,container.Add ); + AddIf( null != (((object)this._complexity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._complexity.ToString()) : null, "complexity" ,container.Add ); + if (null != this._layer) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._layer ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("layers",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H265VideoLayer.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265VideoLayer.cs new file mode 100644 index 000000000000..9b17eb6aa5a7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265VideoLayer.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer. + /// + public partial class H265VideoLayer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayer, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayerInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer __layer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Layer(); + + /// Backing field for property. + private bool? _adaptiveBFrame; + + /// + /// Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will + /// turn it on whenever the video profile permits its use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? AdaptiveBFrame { get => this._adaptiveBFrame; set => this._adaptiveBFrame = value; } + + /// Backing field for property. + private int? _bFrame; + + /// + /// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number + /// based on the video profile and level. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? BFrame { get => this._bFrame; set => this._bFrame = value; } + + /// Backing field for property. + private int _bitrate; + + /// + /// The average bitrate in bits per second at which to encode the input video when generating this layer. For example: a target + /// bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a required field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int Bitrate { get => this._bitrate; set => this._bitrate = value; } + + /// Backing field for property. + private string _frameRate; + + /// + /// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N + /// are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints + /// on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate + /// as the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FrameRate { get => this._frameRate; set => this._frameRate = value; } + + /// + /// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For + /// example 50% means the output video has half as many pixels in height as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Height { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Height; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Height = value ?? null; } + + /// + /// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming + /// the output file. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Label = value ?? null; } + + /// Backing field for property. + private int? _maxBitrate; + + /// + /// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults + /// to the same value as bitrate. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? MaxBitrate { get => this._maxBitrate; set => this._maxBitrate = value; } + + /// Backing field for property. + private int? _slice; + + /// + /// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder + /// will use a single slice for each frame. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Slice { get => this._slice; set => this._slice = value; } + + /// + /// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example + /// 50% means the output video has half as many pixels in width as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Width { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Width; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Width = value ?? null; } + + /// Creates an new instance. + public H265VideoLayer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__layer), __layer); + await eventListener.AssertObjectIsValid(nameof(__layer), __layer); + } + } + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer. + public partial interface IH265VideoLayer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer + { + /// + /// Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will + /// turn it on whenever the video profile permits its use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use.", + SerializedName = @"adaptiveBFrame", + PossibleTypes = new [] { typeof(bool) })] + bool? AdaptiveBFrame { get; set; } + /// + /// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number + /// based on the video profile and level. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level.", + SerializedName = @"bFrames", + PossibleTypes = new [] { typeof(int) })] + int? BFrame { get; set; } + /// + /// The average bitrate in bits per second at which to encode the input video when generating this layer. For example: a target + /// bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a required field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The average bitrate in bits per second at which to encode the input video when generating this layer. For example: a target bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a required field.", + SerializedName = @"bitrate", + PossibleTypes = new [] { typeof(int) })] + int Bitrate { get; set; } + /// + /// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N + /// are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints + /// on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate + /// as the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video.", + SerializedName = @"frameRate", + PossibleTypes = new [] { typeof(string) })] + string FrameRate { get; set; } + /// + /// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults + /// to the same value as bitrate. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate.", + SerializedName = @"maxBitrate", + PossibleTypes = new [] { typeof(int) })] + int? MaxBitrate { get; set; } + /// + /// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder + /// will use a single slice for each frame. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame.", + SerializedName = @"slices", + PossibleTypes = new [] { typeof(int) })] + int? Slice { get; set; } + + } + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer. + internal partial interface IH265VideoLayerInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal + { + /// + /// Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will + /// turn it on whenever the video profile permits its use. + /// + bool? AdaptiveBFrame { get; set; } + /// + /// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number + /// based on the video profile and level. + /// + int? BFrame { get; set; } + /// + /// The average bitrate in bits per second at which to encode the input video when generating this layer. For example: a target + /// bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a required field. + /// + int Bitrate { get; set; } + /// + /// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N + /// are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints + /// on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate + /// as the input video. + /// + string FrameRate { get; set; } + /// + /// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults + /// to the same value as bitrate. + /// + int? MaxBitrate { get; set; } + /// + /// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder + /// will use a single slice for each frame. + /// + int? Slice { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/H265VideoLayer.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265VideoLayer.json.cs new file mode 100644 index 000000000000..3901f200a48d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/H265VideoLayer.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer. + /// + public partial class H265VideoLayer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265VideoLayer FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new H265VideoLayer(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal H265VideoLayer(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __layer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Layer(json); + {_bitrate = If( json?.PropertyT("bitrate"), out var __jsonBitrate) ? (int)__jsonBitrate : Bitrate;} + {_maxBitrate = If( json?.PropertyT("maxBitrate"), out var __jsonMaxBitrate) ? (int?)__jsonMaxBitrate : MaxBitrate;} + {_bFrame = If( json?.PropertyT("bFrames"), out var __jsonBFrames) ? (int?)__jsonBFrames : BFrame;} + {_frameRate = If( json?.PropertyT("frameRate"), out var __jsonFrameRate) ? (string)__jsonFrameRate : (string)FrameRate;} + {_slice = If( json?.PropertyT("slices"), out var __jsonSlices) ? (int?)__jsonSlices : Slice;} + {_adaptiveBFrame = If( json?.PropertyT("adaptiveBFrame"), out var __jsonAdaptiveBFrame) ? (bool?)__jsonAdaptiveBFrame : AdaptiveBFrame;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __layer?.ToJson(container, serializationMode); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._bitrate), "bitrate" ,container.Add ); + AddIf( null != this._maxBitrate ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._maxBitrate) : null, "maxBitrate" ,container.Add ); + AddIf( null != this._bFrame ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._bFrame) : null, "bFrames" ,container.Add ); + AddIf( null != (((object)this._frameRate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._frameRate.ToString()) : null, "frameRate" ,container.Add ); + AddIf( null != this._slice ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._slice) : null, "slices" ,container.Add ); + AddIf( null != this._adaptiveBFrame ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._adaptiveBFrame) : null, "adaptiveBFrame" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Image.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Image.cs new file mode 100644 index 000000000000..5ee651ef8a75 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Image.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the basic properties for generating thumbnails from the input video + public partial class Image : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo __video = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Video(); + + /// + /// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 + /// format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the + /// KeyFrameInterval value will follow the input source setting. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? KeyFrameInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).KeyFrameInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).KeyFrameInterval = value ?? default(global::System.TimeSpan); } + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).Label = value ?? null; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__video).OdataType = value ; } + + /// Backing field for property. + private string _range; + + /// + /// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value + /// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30 seconds from start time), or a frame count + /// (For example, 300 to stop at the 300th frame from the frame at start time. If this value is 1, it means only producing + /// one thumbnail at start time), or a relative value to the stream duration (For example, 50% to stop at half of stream duration + /// from start time). The default value is 100%, which means to stop at the end of the stream. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Range { get => this._range; set => this._range = value; } + + /// Backing field for property. + private string _start; + + /// + /// The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format (For example, + /// PT05S to start at 5 seconds), or a frame count (For example, 10 to start at the 10th frame), or a relative value to stream + /// duration (For example, 10% to start at 10% of stream duration). Also supports a macro {Best}, which tells the encoder + /// to select the best thumbnail from the first few seconds of the video and will only produce one thumbnail, no matter what + /// other settings are for Step and Range. The default value is macro {Best}. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Start { get => this._start; set => this._start = value; } + + /// Backing field for property. + private string _step; + + /// + /// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image + /// every 5 seconds), or a frame count (For example, 30 for one image every 30 frames), or a relative value to stream duration + /// (For example, 10% for one image every 10% of stream duration). Note: Step value will affect the first generated thumbnail, + /// which may not be exactly the one specified at transform preset start time. This is due to the encoder, which tries to + /// select the best thumbnail between start time and Step position from start time as the first output. As the default value + /// is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one specified at + /// start time. Try to select reasonable value for Step if the first thumbnail is expected close to start time, or set Range + /// value at 1 if only one thumbnail is needed at start time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Step { get => this._step; set => this._step = value; } + + /// + /// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).StretchMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).StretchMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode)""); } + + /// The Video Sync Mode + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode? SyncMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).SyncMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__video).SyncMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode)""); } + + /// Creates an new instance. + public Image() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__video), __video); + await eventListener.AssertObjectIsValid(nameof(__video), __video); + } + } + /// Describes the basic properties for generating thumbnails from the input video + public partial interface IImage : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo + { + /// + /// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value + /// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30 seconds from start time), or a frame count + /// (For example, 300 to stop at the 300th frame from the frame at start time. If this value is 1, it means only producing + /// one thumbnail at start time), or a relative value to the stream duration (For example, 50% to stop at half of stream duration + /// from start time). The default value is 100%, which means to stop at the end of the stream. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30 seconds from start time), or a frame count (For example, 300 to stop at the 300th frame from the frame at start time. If this value is 1, it means only producing one thumbnail at start time), or a relative value to the stream duration (For example, 50% to stop at half of stream duration from start time). The default value is 100%, which means to stop at the end of the stream.", + SerializedName = @"range", + PossibleTypes = new [] { typeof(string) })] + string Range { get; set; } + /// + /// The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format (For example, + /// PT05S to start at 5 seconds), or a frame count (For example, 10 to start at the 10th frame), or a relative value to stream + /// duration (For example, 10% to start at 10% of stream duration). Also supports a macro {Best}, which tells the encoder + /// to select the best thumbnail from the first few seconds of the video and will only produce one thumbnail, no matter what + /// other settings are for Step and Range. The default value is macro {Best}. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format (For example, PT05S to start at 5 seconds), or a frame count (For example, 10 to start at the 10th frame), or a relative value to stream duration (For example, 10% to start at 10% of stream duration). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video and will only produce one thumbnail, no matter what other settings are for Step and Range. The default value is macro {Best}.", + SerializedName = @"start", + PossibleTypes = new [] { typeof(string) })] + string Start { get; set; } + /// + /// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image + /// every 5 seconds), or a frame count (For example, 30 for one image every 30 frames), or a relative value to stream duration + /// (For example, 10% for one image every 10% of stream duration). Note: Step value will affect the first generated thumbnail, + /// which may not be exactly the one specified at transform preset start time. This is due to the encoder, which tries to + /// select the best thumbnail between start time and Step position from start time as the first output. As the default value + /// is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one specified at + /// start time. Try to select reasonable value for Step if the first thumbnail is expected close to start time, or set Range + /// value at 1 if only one thumbnail is needed at start time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image every 5 seconds), or a frame count (For example, 30 for one image every 30 frames), or a relative value to stream duration (For example, 10% for one image every 10% of stream duration). Note: Step value will affect the first generated thumbnail, which may not be exactly the one specified at transform preset start time. This is due to the encoder, which tries to select the best thumbnail between start time and Step position from start time as the first output. As the default value is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one specified at start time. Try to select reasonable value for Step if the first thumbnail is expected close to start time, or set Range value at 1 if only one thumbnail is needed at start time.", + SerializedName = @"step", + PossibleTypes = new [] { typeof(string) })] + string Step { get; set; } + + } + /// Describes the basic properties for generating thumbnails from the input video + internal partial interface IImageInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal + { + /// + /// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value + /// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30 seconds from start time), or a frame count + /// (For example, 300 to stop at the 300th frame from the frame at start time. If this value is 1, it means only producing + /// one thumbnail at start time), or a relative value to the stream duration (For example, 50% to stop at half of stream duration + /// from start time). The default value is 100%, which means to stop at the end of the stream. + /// + string Range { get; set; } + /// + /// The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format (For example, + /// PT05S to start at 5 seconds), or a frame count (For example, 10 to start at the 10th frame), or a relative value to stream + /// duration (For example, 10% to start at 10% of stream duration). Also supports a macro {Best}, which tells the encoder + /// to select the best thumbnail from the first few seconds of the video and will only produce one thumbnail, no matter what + /// other settings are for Step and Range. The default value is macro {Best}. + /// + string Start { get; set; } + /// + /// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image + /// every 5 seconds), or a frame count (For example, 30 for one image every 30 frames), or a relative value to stream duration + /// (For example, 10% for one image every 10% of stream duration). Note: Step value will affect the first generated thumbnail, + /// which may not be exactly the one specified at transform preset start time. This is due to the encoder, which tries to + /// select the best thumbnail between start time and Step position from start time as the first output. As the default value + /// is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one specified at + /// start time. Try to select reasonable value for Step if the first thumbnail is expected close to start time, or set Range + /// value at 1 if only one thumbnail is needed at start time. + /// + string Step { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Image.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Image.json.cs new file mode 100644 index 000000000000..8f0a520d3162 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Image.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the basic properties for generating thumbnails from the input video + public partial class Image + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.JpgImage": + { + return new JpgImage(json); + } + case "#Microsoft.Media.PngImage": + { + return new PngImage(json); + } + } + return new Image(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Image(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __video = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Video(json); + {_start = If( json?.PropertyT("start"), out var __jsonStart) ? (string)__jsonStart : (string)Start;} + {_step = If( json?.PropertyT("step"), out var __jsonStep) ? (string)__jsonStep : (string)Step;} + {_range = If( json?.PropertyT("range"), out var __jsonRange) ? (string)__jsonRange : (string)Range;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __video?.ToJson(container, serializationMode); + AddIf( null != (((object)this._start)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._start.ToString()) : null, "start" ,container.Add ); + AddIf( null != (((object)this._step)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._step.ToString()) : null, "step" ,container.Add ); + AddIf( null != (((object)this._range)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._range.ToString()) : null, "range" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ImageFormat.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ImageFormat.cs new file mode 100644 index 000000000000..92493496a6b6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ImageFormat.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the properties for an output image file. + public partial class ImageFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageFormat, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageFormatInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat __format = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Format(); + + /// + /// The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} + /// - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) + /// of the input video file is less than 32 characters long, the base name of input video files will be used. If the length + /// of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total + /// length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} + /// - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + /// thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros + /// will be collapsed and removed from the filename. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string FilenamePattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).FilenamePattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).FilenamePattern = value ; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).OdataType = value ; } + + /// Creates an new instance. + public ImageFormat() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__format), __format); + await eventListener.AssertObjectIsValid(nameof(__format), __format); + } + } + /// Describes the properties for an output image file. + public partial interface IImageFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat + { + + } + /// Describes the properties for an output image file. + internal partial interface IImageFormatInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ImageFormat.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ImageFormat.json.cs new file mode 100644 index 000000000000..461da278e368 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ImageFormat.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the properties for an output image file. + public partial class ImageFormat + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageFormat. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageFormat. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ImageFormat(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ImageFormat(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __format = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Format(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __format?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/InputDefinition.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/InputDefinition.cs new file mode 100644 index 000000000000..bd392287c0bd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/InputDefinition.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for defining an input. Use sub classes of this class to specify tracks selections and related metadata. + /// + public partial class InputDefinition : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor[] _includedTrack; + + /// + /// The list of TrackDescriptors which define the metadata and selection of tracks in the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor[] IncludedTrack { get => this._includedTrack; set => this._includedTrack = value; } + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public InputDefinition() + { + + } + } + /// Base class for defining an input. Use sub classes of this class to specify tracks selections and related metadata. + public partial interface IInputDefinition : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The list of TrackDescriptors which define the metadata and selection of tracks in the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of TrackDescriptors which define the metadata and selection of tracks in the input.", + SerializedName = @"includedTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackByAttribute),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackById) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor[] IncludedTrack { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base class for defining an input. Use sub classes of this class to specify tracks selections and related metadata. + internal partial interface IInputDefinitionInternal + + { + /// + /// The list of TrackDescriptors which define the metadata and selection of tracks in the input. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor[] IncludedTrack { get; set; } + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/InputDefinition.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/InputDefinition.json.cs new file mode 100644 index 000000000000..622eaa11956a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/InputDefinition.json.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for defining an input. Use sub classes of this class to specify tracks selections and related metadata. + /// + public partial class InputDefinition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.FromAllInputFile": + { + return new FromAllInputFile(json); + } + case "#Microsoft.Media.FromEachInputFile": + { + return new FromEachInputFile(json); + } + case "#Microsoft.Media.InputFile": + { + return new InputFile(json); + } + } + return new InputDefinition(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal InputDefinition(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + {_includedTrack = If( json?.PropertyT("includedTracks"), out var __jsonIncludedTracks) ? If( __jsonIncludedTracks as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TrackDescriptor.FromJson(__u) )) ))() : null : IncludedTrack;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + if (null != this._includedTrack) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._includedTrack ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("includedTracks",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/InputFile.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/InputFile.cs new file mode 100644 index 000000000000..2071ef69adba --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/InputFile.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// An InputDefinition for a single file. TrackSelections are scoped to the file specified. + /// + public partial class InputFile : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputFile, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputFileInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition __inputDefinition = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.InputDefinition(); + + /// Backing field for property. + private string _filename; + + /// Name of the file that this input definition applies to. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Filename { get => this._filename; set => this._filename = value; } + + /// + /// The list of TrackDescriptors which define the metadata and selection of tracks in the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor[] IncludedTrack { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).IncludedTrack; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).IncludedTrack = value ?? null /* arrayOf */; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal)__inputDefinition).OdataType = value ; } + + /// Creates an new instance. + public InputFile() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__inputDefinition), __inputDefinition); + await eventListener.AssertObjectIsValid(nameof(__inputDefinition), __inputDefinition); + } + } + /// An InputDefinition for a single file. TrackSelections are scoped to the file specified. + public partial interface IInputFile : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition + { + /// Name of the file that this input definition applies to. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the file that this input definition applies to.", + SerializedName = @"filename", + PossibleTypes = new [] { typeof(string) })] + string Filename { get; set; } + + } + /// An InputDefinition for a single file. TrackSelections are scoped to the file specified. + internal partial interface IInputFileInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinitionInternal + { + /// Name of the file that this input definition applies to. + string Filename { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/InputFile.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/InputFile.json.cs new file mode 100644 index 000000000000..fe98e375a311 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/InputFile.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// An InputDefinition for a single file. TrackSelections are scoped to the file specified. + /// + public partial class InputFile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputFile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputFile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputFile FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new InputFile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal InputFile(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __inputDefinition = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.InputDefinition(json); + {_filename = If( json?.PropertyT("filename"), out var __jsonFilename) ? (string)__jsonFilename : (string)Filename;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __inputDefinition?.ToJson(container, serializationMode); + AddIf( null != (((object)this._filename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._filename.ToString()) : null, "filename" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Job.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Job.cs new file mode 100644 index 000000000000..ef3df4e67e47 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Job.cs @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid. + /// + public partial class Job : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData CorrelationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).CorrelationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).CorrelationData = value ?? null /* model class */; } + + /// + /// The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Created; } + + /// Optional customer supplied description of the Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Description = value ?? null; } + + /// The UTC date and time at which this Job finished processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).EndTime; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string InputOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).InputOdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).InputOdataType = value ?? null; } + + /// + /// The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).LastModified; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInternal.Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Created; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Created = value; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInternal.EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).EndTime = value; } + + /// Internal Acessors for Input + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInternal.Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Input = value; } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInternal.LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).LastModified; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).LastModified = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobProperties()); set { {_property = value;} } } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInternal.StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).StartTime = value; } + + /// Internal Acessors for State + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInternal.State { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).State = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// The outputs for the Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput[] Output { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Output; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Output = value ?? null /* arrayOf */; } + + /// + /// Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not + /// set, the default is normal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? Priority { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Priority; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).Priority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobProperties _property; + + /// The resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobProperties()); set => this._property = value; } + + /// The UTC date and time at which this Job began processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).StartTime; } + + /// The current state of the job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal)Property).State; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public Job() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid. + public partial interface IJob : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer provided key, value pairs that will be returned in Job and JobOutput state events.", + SerializedName = @"correlationData", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData CorrelationData { get; set; } + /// + /// The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// Optional customer supplied description of the Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional customer supplied description of the Job.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The UTC date and time at which this Job finished processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time at which this Job finished processing.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string InputOdataType { get; set; } + /// + /// The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// The outputs for the Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The outputs for the Job.", + SerializedName = @"outputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput[] Output { get; set; } + /// + /// Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not + /// set, the default is normal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not set, the default is normal.", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? Priority { get; set; } + /// The UTC date and time at which this Job began processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time at which this Job began processing.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// The current state of the job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current state of the job.", + SerializedName = @"state", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid. + internal partial interface IJobInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData CorrelationData { get; set; } + /// + /// The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + global::System.DateTime? Created { get; set; } + /// Optional customer supplied description of the Job. + string Description { get; set; } + /// The UTC date and time at which this Job finished processing. + global::System.DateTime? EndTime { get; set; } + /// The inputs for the Job. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput Input { get; set; } + /// The discriminator for derived types. + string InputOdataType { get; set; } + /// + /// The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + global::System.DateTime? LastModified { get; set; } + /// The outputs for the Job. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput[] Output { get; set; } + /// + /// Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not + /// set, the default is normal. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? Priority { get; set; } + /// The resource properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobProperties Property { get; set; } + /// The UTC date and time at which this Job began processing. + global::System.DateTime? StartTime { get; set; } + /// The current state of the job. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Job.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Job.json.cs new file mode 100644 index 000000000000..79a5e5a78503 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Job.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid. + /// + public partial class Job + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Job(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Job(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobCollection.cs new file mode 100644 index 000000000000..760a6ed72cbd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of Job items. + public partial class JobCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobCollectionInternal + { + + /// Backing field for property. + private string _odataNextLink; + + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob[] _value; + + /// A collection of Job items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public JobCollection() + { + + } + } + /// A collection of Job items. + public partial interface IJobCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A link to the next page of the collection (when the collection contains too many results to return in one response).", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// A collection of Job items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of Job items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob[] Value { get; set; } + + } + /// A collection of Job items. + internal partial interface IJobCollectionInternal + + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + string OdataNextLink { get; set; } + /// A collection of Job items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobCollection.json.cs new file mode 100644 index 000000000000..57ebb8bb8aff --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobCollection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of Job items. + public partial class JobCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobCollection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJob) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Job.FromJson(__u) )) ))() : null : Value;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobError.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobError.cs new file mode 100644 index 000000000000..976554d42964 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobError.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Details of JobOutput errors. + public partial class JobError : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? _category; + + /// Helps with categorization of errors. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Category { get => this._category; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? _code; + + /// Error code describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Code { get => this._code; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] _detail; + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// A human-readable language-dependent representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for Category + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal.Category { get => this._category; set { {_category = value;} } } + + /// Internal Acessors for Code + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Retry + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal.Retry { get => this._retry; set { {_retry = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? _retry; + + /// + /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Retry { get => this._retry; } + + /// Creates an new instance. + public JobError() + { + + } + } + /// Details of JobOutput errors. + public partial interface IJobError : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Helps with categorization of errors. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Helps with categorization of errors.", + SerializedName = @"category", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Category { get; } + /// Error code describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code describing the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Code { get; } + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An array of details about specific errors that led to this reported error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Detail { get; } + /// A human-readable language-dependent representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A human-readable language-dependent representation of the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// + /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal.", + SerializedName = @"retry", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Retry { get; } + + } + /// Details of JobOutput errors. + internal partial interface IJobErrorInternal + + { + /// Helps with categorization of errors. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Category { get; set; } + /// Error code describing the error. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Code { get; set; } + /// An array of details about specific errors that led to this reported error. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Detail { get; set; } + /// A human-readable language-dependent representation of the error. + string Message { get; set; } + /// + /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Retry { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobError.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobError.json.cs new file mode 100644 index 000000000000..cdb3d5828819 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobError.json.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Details of JobOutput errors. + public partial class JobError + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobError(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobError(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_category = If( json?.PropertyT("category"), out var __jsonCategory) ? (string)__jsonCategory : (string)Category;} + {_retry = If( json?.PropertyT("retry"), out var __jsonRetry) ? (string)__jsonRetry : (string)Retry;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobErrorDetail.FromJson(__u) )) ))() : null : Detail;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._category)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._category.ToString()) : null, "category" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._retry)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._retry.ToString()) : null, "retry" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobErrorDetail.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobErrorDetail.cs new file mode 100644 index 000000000000..72a6cf146425 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobErrorDetail.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Details of JobOutput errors. + public partial class JobErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetailInternal + { + + /// Backing field for property. + private string _code; + + /// Code describing the error detail. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private string _message; + + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Creates an new instance. + public JobErrorDetail() + { + + } + } + /// Details of JobOutput errors. + public partial interface IJobErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Code describing the error detail. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Code describing the error detail.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A human-readable representation of the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + + } + /// Details of JobOutput errors. + internal partial interface IJobErrorDetailInternal + + { + /// Code describing the error detail. + string Code { get; set; } + /// A human-readable representation of the error. + string Message { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobErrorDetail.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobErrorDetail.json.cs new file mode 100644 index 000000000000..edb3fb94e62d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobErrorDetail.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Details of JobOutput errors. + public partial class JobErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobErrorDetail(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInput.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInput.cs new file mode 100644 index 000000000000..a265997e51d2 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInput.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Base class for inputs to a Job. + public partial class JobInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal + { + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public JobInput() + { + + } + } + /// Base class for inputs to a Job. + public partial interface IJobInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base class for inputs to a Job. + internal partial interface IJobInputInternal + + { + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInput.json.cs new file mode 100644 index 000000000000..9fb99b415920 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInput.json.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Base class for inputs to a Job. + public partial class JobInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.JobInputClip": + { + return new JobInputClip(json); + } + case "#Microsoft.Media.JobInputs": + { + return new JobInputs(json); + } + case "#Microsoft.Media.JobInputAsset": + { + return new JobInputAsset(json); + } + case "#Microsoft.Media.JobInputHttp": + { + return new JobInputHttp(json); + } + case "#Microsoft.Media.JobInputSequence": + { + return new JobInputSequence(json); + } + } + return new JobInput(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobInput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputAsset.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputAsset.cs new file mode 100644 index 000000000000..fa17201d5cc9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputAsset.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents an Asset for input into a Job. + public partial class JobInputAsset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputAsset, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputAssetInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip __jobInputClip = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInputClip(); + + /// Backing field for property. + private string _assetName; + + /// The name of the input Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AssetName { get => this._assetName; set => this._assetName = value; } + + /// + /// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime End { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).End; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).End = value ?? null /* model class */; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string EndOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).EndOdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).EndOdataType = value ?? null; } + + /// + /// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service + /// responses to prevent sensitive data exposure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string[] File { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).File; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).File = value ?? null /* arrayOf */; } + + /// + /// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition[] InputDefinition { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).InputDefinition; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).InputDefinition = value ?? null /* arrayOf */; } + + /// + /// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a + /// Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video + /// before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have + /// the label 'xyz'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).Label = value ?? null; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInputClip).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInputClip).OdataType = value ; } + + /// + /// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input + /// media. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime Start { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).Start; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).Start = value ?? null /* model class */; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string StartOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).StartOdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).StartOdataType = value ?? null; } + + /// Creates an new instance. + public JobInputAsset() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__jobInputClip), __jobInputClip); + await eventListener.AssertObjectIsValid(nameof(__jobInputClip), __jobInputClip); + } + } + /// Represents an Asset for input into a Job. + public partial interface IJobInputAsset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip + { + /// The name of the input Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input Asset.", + SerializedName = @"assetName", + PossibleTypes = new [] { typeof(string) })] + string AssetName { get; set; } + + } + /// Represents an Asset for input into a Job. + internal partial interface IJobInputAssetInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal + { + /// The name of the input Asset. + string AssetName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputAsset.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputAsset.json.cs new file mode 100644 index 000000000000..fbfe514ca8a4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputAsset.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents an Asset for input into a Job. + public partial class JobInputAsset + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputAsset. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputAsset. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputAsset FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobInputAsset(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobInputAsset(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __jobInputClip = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInputClip(json); + {_assetName = If( json?.PropertyT("assetName"), out var __jsonAssetName) ? (string)__jsonAssetName : (string)AssetName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __jobInputClip?.ToJson(container, serializationMode); + AddIf( null != (((object)this._assetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._assetName.ToString()) : null, "assetName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputClip.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputClip.cs new file mode 100644 index 000000000000..9a5d421eb0ef --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputClip.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents input files for a Job. + public partial class JobInputClip : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput __jobInput = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime _end; + + /// + /// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime End { get => (this._end = this._end ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime()); set => this._end = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EndOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal)End).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal)End).OdataType = value ?? null; } + + /// Backing field for property. + private string[] _file; + + /// + /// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service + /// responses to prevent sensitive data exposure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] File { get => this._file; set => this._file = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition[] _inputDefinition; + + /// + /// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition[] InputDefinition { get => this._inputDefinition; set => this._inputDefinition = value; } + + /// Backing field for property. + private string _label; + + /// + /// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a + /// Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video + /// before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have + /// the label 'xyz'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Label { get => this._label; set => this._label = value; } + + /// Internal Acessors for End + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal.End { get => (this._end = this._end ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime()); set { {_end = value;} } } + + /// Internal Acessors for Start + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal.Start { get => (this._start = this._start ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime()); set { {_start = value;} } } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInput).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInput).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime _start; + + /// + /// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input + /// media. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime Start { get => (this._start = this._start ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime()); set => this._start = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string StartOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal)Start).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal)Start).OdataType = value ?? null; } + + /// Creates an new instance. + public JobInputClip() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__jobInput), __jobInput); + await eventListener.AssertObjectIsValid(nameof(__jobInput), __jobInput); + } + } + /// Represents input files for a Job. + public partial interface IJobInputClip : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string EndOdataType { get; set; } + /// + /// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service + /// responses to prevent sensitive data exposure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service responses to prevent sensitive data exposure.", + SerializedName = @"files", + PossibleTypes = new [] { typeof(string) })] + string[] File { get; set; } + /// + /// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata.", + SerializedName = @"inputDefinitions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromAllInputFile),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFromEachInputFile),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputFile) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition[] InputDefinition { get; set; } + /// + /// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a + /// Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video + /// before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have + /// the label 'xyz'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'.", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string Label { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string StartOdataType { get; set; } + + } + /// Represents input files for a Job. + internal partial interface IJobInputClipInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal + { + /// + /// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime End { get; set; } + /// The discriminator for derived types. + string EndOdataType { get; set; } + /// + /// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service + /// responses to prevent sensitive data exposure. + /// + string[] File { get; set; } + /// + /// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition[] InputDefinition { get; set; } + /// + /// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a + /// Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video + /// before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have + /// the label 'xyz'. + /// + string Label { get; set; } + /// + /// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input + /// media. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime Start { get; set; } + /// The discriminator for derived types. + string StartOdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputClip.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputClip.json.cs new file mode 100644 index 000000000000..8529437ec5e0 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputClip.json.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents input files for a Job. + public partial class JobInputClip + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.JobInputAsset": + { + return new JobInputAsset(json); + } + case "#Microsoft.Media.JobInputHttp": + { + return new JobInputHttp(json); + } + } + return new JobInputClip(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobInputClip(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __jobInput = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput(json); + {_start = If( json?.PropertyT("start"), out var __jsonStart) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime.FromJson(__jsonStart) : Start;} + {_end = If( json?.PropertyT("end"), out var __jsonEnd) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime.FromJson(__jsonEnd) : End;} + {_file = If( json?.PropertyT("files"), out var __jsonFiles) ? If( __jsonFiles as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : File;} + {_label = If( json?.PropertyT("label"), out var __jsonLabel) ? (string)__jsonLabel : (string)Label;} + {_inputDefinition = If( json?.PropertyT("inputDefinitions"), out var __jsonInputDefinitions) ? If( __jsonInputDefinitions as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.InputDefinition.FromJson(__p) )) ))() : null : InputDefinition;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __jobInput?.ToJson(container, serializationMode); + AddIf( null != this._start ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._start.ToJson(null,serializationMode) : null, "start" ,container.Add ); + AddIf( null != this._end ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._end.ToJson(null,serializationMode) : null, "end" ,container.Add ); + if (null != this._file) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._file ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("files",__w); + } + AddIf( null != (((object)this._label)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._label.ToString()) : null, "label" ,container.Add ); + if (null != this._inputDefinition) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._inputDefinition ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("inputDefinitions",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputHttp.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputHttp.cs new file mode 100644 index 000000000000..fa3b85717470 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputHttp.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents HTTPS job input. + public partial class JobInputHttp : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputHttp, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputHttpInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip __jobInputClip = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInputClip(); + + /// Backing field for property. + private string _baseUri; + + /// + /// Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided + /// file list is assumed to be fully qualified uris. Maximum length of 4000 characters. The query strings will not be returned + /// in service responses to prevent sensitive data exposure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string BaseUri { get => this._baseUri; set => this._baseUri = value; } + + /// + /// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime End { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).End; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).End = value ?? null /* model class */; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string EndOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).EndOdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).EndOdataType = value ?? null; } + + /// + /// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service + /// responses to prevent sensitive data exposure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string[] File { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).File; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).File = value ?? null /* arrayOf */; } + + /// + /// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IInputDefinition[] InputDefinition { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).InputDefinition; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).InputDefinition = value ?? null /* arrayOf */; } + + /// + /// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a + /// Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video + /// before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have + /// the label 'xyz'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).Label = value ?? null; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInputClip).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInputClip).OdataType = value ; } + + /// + /// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input + /// media. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime Start { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).Start; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).Start = value ?? null /* model class */; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string StartOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).StartOdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal)__jobInputClip).StartOdataType = value ?? null; } + + /// Creates an new instance. + public JobInputHttp() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__jobInputClip), __jobInputClip); + await eventListener.AssertObjectIsValid(nameof(__jobInputClip), __jobInputClip); + } + } + /// Represents HTTPS job input. + public partial interface IJobInputHttp : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip + { + /// + /// Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided + /// file list is assumed to be fully qualified uris. Maximum length of 4000 characters. The query strings will not be returned + /// in service responses to prevent sensitive data exposure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided file list is assumed to be fully qualified uris. Maximum length of 4000 characters. The query strings will not be returned in service responses to prevent sensitive data exposure.", + SerializedName = @"baseUri", + PossibleTypes = new [] { typeof(string) })] + string BaseUri { get; set; } + + } + /// Represents HTTPS job input. + internal partial interface IJobInputHttpInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClipInternal + { + /// + /// Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided + /// file list is assumed to be fully qualified uris. Maximum length of 4000 characters. The query strings will not be returned + /// in service responses to prevent sensitive data exposure. + /// + string BaseUri { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputHttp.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputHttp.json.cs new file mode 100644 index 000000000000..fcc83007bb89 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputHttp.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents HTTPS job input. + public partial class JobInputHttp + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputHttp. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputHttp. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputHttp FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobInputHttp(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobInputHttp(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __jobInputClip = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInputClip(json); + {_baseUri = If( json?.PropertyT("baseUri"), out var __jsonBaseUri) ? (string)__jsonBaseUri : (string)BaseUri;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __jobInputClip?.ToJson(container, serializationMode); + AddIf( null != (((object)this._baseUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._baseUri.ToString()) : null, "baseUri" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputSequence.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputSequence.cs new file mode 100644 index 000000000000..93c3d975c523 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputSequence.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will be treated as a single input. + /// + public partial class JobInputSequence : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputSequence, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputSequenceInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput __jobInput = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip[] _input; + + /// JobInputs that make up the timeline. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip[] Input { get => this._input; set => this._input = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInput).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInput).OdataType = value ; } + + /// Creates an new instance. + public JobInputSequence() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__jobInput), __jobInput); + await eventListener.AssertObjectIsValid(nameof(__jobInput), __jobInput); + } + } + /// A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will be treated as a single input. + public partial interface IJobInputSequence : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput + { + /// JobInputs that make up the timeline. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"JobInputs that make up the timeline.", + SerializedName = @"inputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputAsset),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputHttp) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip[] Input { get; set; } + + } + /// A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will be treated as a single input. + internal partial interface IJobInputSequenceInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal + { + /// JobInputs that make up the timeline. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip[] Input { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputSequence.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputSequence.json.cs new file mode 100644 index 000000000000..75d624b02390 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputSequence.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will be treated as a single input. + /// + public partial class JobInputSequence + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputSequence. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputSequence. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputSequence FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobInputSequence(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobInputSequence(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __jobInput = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput(json); + {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInputClip.FromJson(__u) )) ))() : null : Input;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __jobInput?.ToJson(container, serializationMode); + if (null != this._input) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._input ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("inputs",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputs.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputs.cs new file mode 100644 index 000000000000..99856c6c7781 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputs.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes a list of inputs to a Job. + public partial class JobInputs : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputs, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputsInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput __jobInput = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput[] _input; + + /// List of inputs to a Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput[] Input { get => this._input; set => this._input = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInput).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)__jobInput).OdataType = value ; } + + /// Creates an new instance. + public JobInputs() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__jobInput), __jobInput); + await eventListener.AssertObjectIsValid(nameof(__jobInput), __jobInput); + } + } + /// Describes a list of inputs to a Job. + public partial interface IJobInputs : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput + { + /// List of inputs to a Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of inputs to a Job.", + SerializedName = @"inputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputClip),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputs) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput[] Input { get; set; } + + } + /// Describes a list of inputs to a Job. + internal partial interface IJobInputsInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal + { + /// List of inputs to a Job. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput[] Input { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputs.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputs.json.cs new file mode 100644 index 000000000000..c03c7f7af084 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobInputs.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes a list of inputs to a Job. + public partial class JobInputs + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputs. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputs. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputs FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobInputs(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobInputs(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __jobInput = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput(json); + {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput.FromJson(__u) )) ))() : null : Input;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __jobInput?.ToJson(container, serializationMode); + if (null != this._input) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._input ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("inputs",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutput.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutput.cs new file mode 100644 index 000000000000..ee81d9656e75 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutput.cs @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes all the properties of a JobOutput. + public partial class JobOutput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal + { + + /// Helps with categorization of errors. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Category { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Category; } + + /// Error code describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Code; } + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Detail; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// The UTC date and time at which this Job Output finished processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError _error; + + /// If the JobOutput is in the Error state, it contains the details of the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobError()); } + + /// Backing field for property. + private string _label; + + /// + /// A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has + /// more than one TransformOutput, whereby your Job has more than one JobOutput. In such cases, when you submit the Job, you + /// will add two or more JobOutputs, in the same order as TransformOutputs in the Transform. Subsequently, when you retrieve + /// the Job, either through events or on a GET request, you can use the label to easily identify the JobOutput. If a label + /// is not provided, a default value of '{presetName}_{outputIndex}' will be used, where the preset name is the name of the + /// preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the + /// Job. Note that this index is the same as the relative index of the corresponding TransformOutput within its Transform. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Label { get => this._label; set => this._label = value; } + + /// A human-readable language-dependent representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Message; } + + /// Internal Acessors for Category + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Category { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Category; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Category = value; } + + /// Internal Acessors for Code + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Detail = value; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobError()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Message = value; } + + /// Internal Acessors for PresetOverride + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.PresetOverride { get => (this._presetOverride = this._presetOverride ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset()); set { {_presetOverride = value;} } } + + /// Internal Acessors for Progress + int? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Progress { get => this._progress; set { {_progress = value;} } } + + /// Internal Acessors for Retry + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Retry { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Retry; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Retry = value; } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for State + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.State { get => this._state; set { {_state = value;} } } + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset _presetOverride; + + /// A preset used to override the preset in the corresponding transform output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset PresetOverride { get => (this._presetOverride = this._presetOverride ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset()); set => this._presetOverride = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PresetOverrideOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)PresetOverride).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)PresetOverride).OdataType = value ?? null; } + + /// Backing field for property. + private int? _progress; + + /// + /// If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate and not + /// intended to be used to predict Job completion times. To determine if the JobOutput is complete, use the State property. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Progress { get => this._progress; } + + /// + /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Retry { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorInternal)Error).Retry; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// The UTC date and time at which this Job Output began processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? _state; + + /// Describes the state of the JobOutput. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get => this._state; } + + /// Creates an new instance. + public JobOutput() + { + + } + } + /// Describes all the properties of a JobOutput. + public partial interface IJobOutput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Helps with categorization of errors. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Helps with categorization of errors.", + SerializedName = @"category", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Category { get; } + /// Error code describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code describing the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Code { get; } + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An array of details about specific errors that led to this reported error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Detail { get; } + /// The UTC date and time at which this Job Output finished processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time at which this Job Output finished processing.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// + /// A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has + /// more than one TransformOutput, whereby your Job has more than one JobOutput. In such cases, when you submit the Job, you + /// will add two or more JobOutputs, in the same order as TransformOutputs in the Transform. Subsequently, when you retrieve + /// the Job, either through events or on a GET request, you can use the label to easily identify the JobOutput. If a label + /// is not provided, a default value of '{presetName}_{outputIndex}' will be used, where the preset name is the name of the + /// preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the + /// Job. Note that this index is the same as the relative index of the corresponding TransformOutput within its Transform. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has more than one TransformOutput, whereby your Job has more than one JobOutput. In such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs in the Transform. Subsequently, when you retrieve the Job, either through events or on a GET request, you can use the label to easily identify the JobOutput. If a label is not provided, a default value of '{presetName}_{outputIndex}' will be used, where the preset name is the name of the preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the Job. Note that this index is the same as the relative index of the corresponding TransformOutput within its Transform.", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string Label { get; set; } + /// A human-readable language-dependent representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A human-readable language-dependent representation of the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string PresetOverrideOdataType { get; set; } + /// + /// If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate and not + /// intended to be used to predict Job completion times. To determine if the JobOutput is complete, use the State property. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate and not intended to be used to predict Job completion times. To determine if the JobOutput is complete, use the State property.", + SerializedName = @"progress", + PossibleTypes = new [] { typeof(int) })] + int? Progress { get; } + /// + /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal.", + SerializedName = @"retry", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Retry { get; } + /// The UTC date and time at which this Job Output began processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time at which this Job Output began processing.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// Describes the state of the JobOutput. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Describes the state of the JobOutput.", + SerializedName = @"state", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get; } + + } + /// Describes all the properties of a JobOutput. + internal partial interface IJobOutputInternal + + { + /// Helps with categorization of errors. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Category { get; set; } + /// Error code describing the error. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Code { get; set; } + /// An array of details about specific errors that led to this reported error. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Detail { get; set; } + /// The UTC date and time at which this Job Output finished processing. + global::System.DateTime? EndTime { get; set; } + /// If the JobOutput is in the Error state, it contains the details of the error. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError Error { get; set; } + /// + /// A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has + /// more than one TransformOutput, whereby your Job has more than one JobOutput. In such cases, when you submit the Job, you + /// will add two or more JobOutputs, in the same order as TransformOutputs in the Transform. Subsequently, when you retrieve + /// the Job, either through events or on a GET request, you can use the label to easily identify the JobOutput. If a label + /// is not provided, a default value of '{presetName}_{outputIndex}' will be used, where the preset name is the name of the + /// preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the + /// Job. Note that this index is the same as the relative index of the corresponding TransformOutput within its Transform. + /// + string Label { get; set; } + /// A human-readable language-dependent representation of the error. + string Message { get; set; } + /// The discriminator for derived types. + string OdataType { get; set; } + /// A preset used to override the preset in the corresponding transform output. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset PresetOverride { get; set; } + /// The discriminator for derived types. + string PresetOverrideOdataType { get; set; } + /// + /// If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate and not + /// intended to be used to predict Job completion times. To determine if the JobOutput is complete, use the State property. + /// + int? Progress { get; set; } + /// + /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Retry { get; set; } + /// The UTC date and time at which this Job Output began processing. + global::System.DateTime? StartTime { get; set; } + /// Describes the state of the JobOutput. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutput.json.cs new file mode 100644 index 000000000000..61baa749c0eb --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutput.json.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes all the properties of a JobOutput. + public partial class JobOutput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.JobOutputAsset": + { + return new JobOutputAsset(json); + } + } + return new JobOutput(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobOutput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobError.FromJson(__jsonError) : Error;} + {_presetOverride = If( json?.PropertyT("presetOverride"), out var __jsonPresetOverride) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset.FromJson(__jsonPresetOverride) : PresetOverride;} + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + {_state = If( json?.PropertyT("state"), out var __jsonState) ? (string)__jsonState : (string)State;} + {_progress = If( json?.PropertyT("progress"), out var __jsonProgress) ? (int?)__jsonProgress : Progress;} + {_label = If( json?.PropertyT("label"), out var __jsonLabel) ? (string)__jsonLabel : (string)Label;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + } + AddIf( null != this._presetOverride ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._presetOverride.ToJson(null,serializationMode) : null, "presetOverride" ,container.Add ); + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._state)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._state.ToString()) : null, "state" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._progress ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._progress) : null, "progress" ,container.Add ); + } + AddIf( null != (((object)this._label)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._label.ToString()) : null, "label" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutputAsset.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutputAsset.cs new file mode 100644 index 000000000000..adc07a6623bc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutputAsset.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents an Asset used as a JobOutput. + public partial class JobOutputAsset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputAsset, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputAssetInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput __jobOutput = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobOutput(); + + /// Backing field for property. + private string _assetName; + + /// The name of the output Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AssetName { get => this._assetName; set => this._assetName = value; } + + /// Helps with categorization of errors. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Category { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Category; } + + /// Error code describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Code; } + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Detail; } + + /// The UTC date and time at which this Job Output finished processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).EndTime; } + + /// If the JobOutput is in the Error state, it contains the details of the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Error; } + + /// + /// A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has + /// more than one TransformOutput, whereby your Job has more than one JobOutput. In such cases, when you submit the Job, you + /// will add two or more JobOutputs, in the same order as TransformOutputs in the Transform. Subsequently, when you retrieve + /// the Job, either through events or on a GET request, you can use the label to easily identify the JobOutput. If a label + /// is not provided, a default value of '{presetName}_{outputIndex}' will be used, where the preset name is the name of the + /// preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the + /// Job. Note that this index is the same as the relative index of the corresponding TransformOutput within its Transform. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Label = value ?? null; } + + /// A human-readable language-dependent representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Message; } + + /// Internal Acessors for Category + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Category { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Category; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Category = value; } + + /// Internal Acessors for Code + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Detail = value; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).EndTime = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobError Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Error = value; } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Message = value; } + + /// Internal Acessors for Progress + int? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Progress { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Progress; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Progress = value; } + + /// Internal Acessors for Retry + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.Retry { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Retry; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Retry = value; } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).StartTime = value; } + + /// Internal Acessors for State + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal.State { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).State = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).OdataType = value ; } + + /// A preset used to override the preset in the corresponding transform output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset PresetOverride { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).PresetOverride; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).PresetOverride = value ?? null /* model class */; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string PresetOverrideOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).PresetOverrideOdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).PresetOverrideOdataType = value ?? null; } + + /// + /// If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate and not + /// intended to be used to predict Job completion times. To determine if the JobOutput is complete, use the State property. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public int? Progress { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Progress; } + + /// + /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry? Retry { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).Retry; } + + /// The UTC date and time at which this Job Output began processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).StartTime; } + + /// Describes the state of the JobOutput. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal)__jobOutput).State; } + + /// Creates an new instance. + public JobOutputAsset() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__jobOutput), __jobOutput); + await eventListener.AssertObjectIsValid(nameof(__jobOutput), __jobOutput); + } + } + /// Represents an Asset used as a JobOutput. + public partial interface IJobOutputAsset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput + { + /// The name of the output Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output Asset.", + SerializedName = @"assetName", + PossibleTypes = new [] { typeof(string) })] + string AssetName { get; set; } + + } + /// Represents an Asset used as a JobOutput. + internal partial interface IJobOutputAssetInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputInternal + { + /// The name of the output Asset. + string AssetName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutputAsset.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutputAsset.json.cs new file mode 100644 index 000000000000..b7105a51d86b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobOutputAsset.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents an Asset used as a JobOutput. + public partial class JobOutputAsset + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputAsset. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputAsset. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutputAsset FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobOutputAsset(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobOutputAsset(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __jobOutput = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobOutput(json); + {_assetName = If( json?.PropertyT("assetName"), out var __jsonAssetName) ? (string)__jsonAssetName : (string)AssetName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __jobOutput?.ToJson(container, serializationMode); + AddIf( null != (((object)this._assetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._assetName.ToString()) : null, "assetName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobProperties.cs new file mode 100644 index 000000000000..53c4b30cbca0 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobProperties.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the Job. + public partial class JobProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData _correlationData; + + /// + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData CorrelationData { get => (this._correlationData = this._correlationData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobPropertiesCorrelationData()); set => this._correlationData = value; } + + /// Backing field for property. + private global::System.DateTime? _created; + + /// + /// The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private string _description; + + /// Optional customer supplied description of the Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// The UTC date and time at which this Job finished processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput _input; + + /// The inputs for the Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput()); set => this._input = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string InputOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)Input).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInputInternal)Input).OdataType = value ; } + + /// Backing field for property. + private global::System.DateTime? _lastModified; + + /// + /// The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? LastModified { get => this._lastModified; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal.Created { get => this._created; set { {_created = value;} } } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + + /// Internal Acessors for Input + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal.Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput()); set { {_input = value;} } } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal.LastModified { get => this._lastModified; set { {_lastModified = value;} } } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for State + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesInternal.State { get => this._state; set { {_state = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput[] _output; + + /// The outputs for the Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput[] Output { get => this._output; set => this._output = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? _priority; + + /// + /// Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not + /// set, the default is normal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? Priority { get => this._priority; set => this._priority = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// The UTC date and time at which this Job began processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? _state; + + /// The current state of the job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get => this._state; } + + /// Creates an new instance. + public JobProperties() + { + + } + } + /// Properties of the Job. + public partial interface IJobProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer provided key, value pairs that will be returned in Job and JobOutput state events.", + SerializedName = @"correlationData", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData CorrelationData { get; set; } + /// + /// The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// Optional customer supplied description of the Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional customer supplied description of the Job.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The UTC date and time at which this Job finished processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time at which this Job finished processing.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string InputOdataType { get; set; } + /// + /// The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// The outputs for the Job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The outputs for the Job.", + SerializedName = @"outputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput[] Output { get; set; } + /// + /// Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not + /// set, the default is normal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not set, the default is normal.", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? Priority { get; set; } + /// The UTC date and time at which this Job began processing. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time at which this Job began processing.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// The current state of the job. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current state of the job.", + SerializedName = @"state", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get; } + + } + /// Properties of the Job. + internal partial interface IJobPropertiesInternal + + { + /// + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData CorrelationData { get; set; } + /// + /// The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + global::System.DateTime? Created { get; set; } + /// Optional customer supplied description of the Job. + string Description { get; set; } + /// The UTC date and time at which this Job finished processing. + global::System.DateTime? EndTime { get; set; } + /// The inputs for the Job. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobInput Input { get; set; } + /// The discriminator for derived types. + string InputOdataType { get; set; } + /// + /// The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + global::System.DateTime? LastModified { get; set; } + /// The outputs for the Job. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput[] Output { get; set; } + /// + /// Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not + /// set, the default is normal. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? Priority { get; set; } + /// The UTC date and time at which this Job began processing. + global::System.DateTime? StartTime { get; set; } + /// The current state of the job. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState? State { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobProperties.json.cs new file mode 100644 index 000000000000..81fe0b946aed --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobProperties.json.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the Job. + public partial class JobProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JobProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_input = If( json?.PropertyT("input"), out var __jsonInput) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobInput.FromJson(__jsonInput) : Input;} + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_state = If( json?.PropertyT("state"), out var __jsonState) ? (string)__jsonState : (string)State;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_lastModified = If( json?.PropertyT("lastModified"), out var __jsonLastModified) ? global::System.DateTime.TryParse((string)__jsonLastModified, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedValue) ? __jsonLastModifiedValue : LastModified : LastModified;} + {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? If( __jsonOutputs as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobOutput) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobOutput.FromJson(__u) )) ))() : null : Output;} + {_priority = If( json?.PropertyT("priority"), out var __jsonPriority) ? (string)__jsonPriority : (string)Priority;} + {_correlationData = If( json?.PropertyT("correlationData"), out var __jsonCorrelationData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobPropertiesCorrelationData.FromJson(__jsonCorrelationData) : CorrelationData;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._input ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._input.ToJson(null,serializationMode) : null, "input" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._state)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._state.ToString()) : null, "state" ,container.Add ); + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._lastModified ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModified?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModified" ,container.Add ); + } + if (null != this._output) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._output ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("outputs",__w); + } + AddIf( null != (((object)this._priority)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._priority.ToString()) : null, "priority" ,container.Add ); + AddIf( null != this._correlationData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._correlationData.ToJson(null,serializationMode) : null, "correlationData" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.cs new file mode 100644 index 000000000000..6c32bc42fc0b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + /// + public partial class JobPropertiesCorrelationData : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationDataInternal + { + + /// Creates an new instance. + public JobPropertiesCorrelationData() + { + + } + } + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + public partial interface IJobPropertiesCorrelationData : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + + } + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + internal partial interface IJobPropertiesCorrelationDataInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.dictionary.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.dictionary.cs new file mode 100644 index 000000000000..a931be80bf7f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class JobPropertiesCorrelationData : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JobPropertiesCorrelationData source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.json.cs new file mode 100644 index 000000000000..5e65266a0d56 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JobPropertiesCorrelationData.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Customer provided key, value pairs that will be returned in Job and JobOutput state events. + /// + public partial class JobPropertiesCorrelationData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJobPropertiesCorrelationData FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JobPropertiesCorrelationData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + /// + internal JobPropertiesCorrelationData(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgFormat.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgFormat.cs new file mode 100644 index 000000000000..8cc343889f29 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgFormat.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the settings for producing JPEG thumbnails. + public partial class JpgFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgFormat, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgFormatInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat __format = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Format(); + + /// + /// The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} + /// - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) + /// of the input video file is less than 32 characters long, the base name of input video files will be used. If the length + /// of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total + /// length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} + /// - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + /// thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros + /// will be collapsed and removed from the filename. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string FilenamePattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).FilenamePattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).FilenamePattern = value ; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).OdataType = value ; } + + /// Creates an new instance. + public JpgFormat() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__format), __format); + await eventListener.AssertObjectIsValid(nameof(__format), __format); + } + } + /// Describes the settings for producing JPEG thumbnails. + public partial interface IJpgFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat + { + + } + /// Describes the settings for producing JPEG thumbnails. + internal partial interface IJpgFormatInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgFormat.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgFormat.json.cs new file mode 100644 index 000000000000..73b44d36896a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgFormat.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the settings for producing JPEG thumbnails. + public partial class JpgFormat + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgFormat. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgFormat. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JpgFormat(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JpgFormat(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __format = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Format(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __format?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgImage.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgImage.cs new file mode 100644 index 000000000000..346b9cf9573f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgImage.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties for producing a series of JPEG images from the input video. + /// + public partial class JpgImage : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgImage, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgImageInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage __image = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Image(); + + /// + /// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 + /// format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the + /// KeyFrameInterval value will follow the input source setting. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? KeyFrameInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).KeyFrameInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).KeyFrameInterval = value ?? default(global::System.TimeSpan); } + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__image).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__image).Label = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer[] _layer; + + /// A collection of output JPEG image layers to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer[] Layer { get => this._layer; set => this._layer = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__image).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__image).OdataType = value ; } + + /// + /// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value + /// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30 seconds from start time), or a frame count + /// (For example, 300 to stop at the 300th frame from the frame at start time. If this value is 1, it means only producing + /// one thumbnail at start time), or a relative value to the stream duration (For example, 50% to stop at half of stream duration + /// from start time). The default value is 100%, which means to stop at the end of the stream. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Range { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Range; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Range = value ?? null; } + + /// Backing field for property. + private int? _spriteColumn; + + /// + /// Sets the number of columns used in thumbnail sprite image. The number of rows are automatically calculated and a VTT file + /// is generated with the coordinate mappings for each thumbnail in the sprite. Note: this value should be a positive integer + /// and a proper value is recommended so that the output image resolution will not go beyond JPEG maximum pixel resolution + /// limit 65535x65535. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? SpriteColumn { get => this._spriteColumn; set => this._spriteColumn = value; } + + /// + /// The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format (For example, + /// PT05S to start at 5 seconds), or a frame count (For example, 10 to start at the 10th frame), or a relative value to stream + /// duration (For example, 10% to start at 10% of stream duration). Also supports a macro {Best}, which tells the encoder + /// to select the best thumbnail from the first few seconds of the video and will only produce one thumbnail, no matter what + /// other settings are for Step and Range. The default value is macro {Best}. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Start { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Start; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Start = value ; } + + /// + /// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image + /// every 5 seconds), or a frame count (For example, 30 for one image every 30 frames), or a relative value to stream duration + /// (For example, 10% for one image every 10% of stream duration). Note: Step value will affect the first generated thumbnail, + /// which may not be exactly the one specified at transform preset start time. This is due to the encoder, which tries to + /// select the best thumbnail between start time and Step position from start time as the first output. As the default value + /// is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one specified at + /// start time. Try to select reasonable value for Step if the first thumbnail is expected close to start time, or set Range + /// value at 1 if only one thumbnail is needed at start time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Step; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Step = value ?? null; } + + /// + /// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).StretchMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).StretchMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode)""); } + + /// The Video Sync Mode + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode? SyncMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).SyncMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).SyncMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode)""); } + + /// Creates an new instance. + public JpgImage() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__image), __image); + await eventListener.AssertObjectIsValid(nameof(__image), __image); + } + } + /// Describes the properties for producing a series of JPEG images from the input video. + public partial interface IJpgImage : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage + { + /// A collection of output JPEG image layers to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of output JPEG image layers to be produced by the encoder.", + SerializedName = @"layers", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer[] Layer { get; set; } + /// + /// Sets the number of columns used in thumbnail sprite image. The number of rows are automatically calculated and a VTT file + /// is generated with the coordinate mappings for each thumbnail in the sprite. Note: this value should be a positive integer + /// and a proper value is recommended so that the output image resolution will not go beyond JPEG maximum pixel resolution + /// limit 65535x65535. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sets the number of columns used in thumbnail sprite image. The number of rows are automatically calculated and a VTT file is generated with the coordinate mappings for each thumbnail in the sprite. Note: this value should be a positive integer and a proper value is recommended so that the output image resolution will not go beyond JPEG maximum pixel resolution limit 65535x65535.", + SerializedName = @"spriteColumn", + PossibleTypes = new [] { typeof(int) })] + int? SpriteColumn { get; set; } + + } + /// Describes the properties for producing a series of JPEG images from the input video. + internal partial interface IJpgImageInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal + { + /// A collection of output JPEG image layers to be produced by the encoder. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer[] Layer { get; set; } + /// + /// Sets the number of columns used in thumbnail sprite image. The number of rows are automatically calculated and a VTT file + /// is generated with the coordinate mappings for each thumbnail in the sprite. Note: this value should be a positive integer + /// and a proper value is recommended so that the output image resolution will not go beyond JPEG maximum pixel resolution + /// limit 65535x65535. + /// + int? SpriteColumn { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgImage.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgImage.json.cs new file mode 100644 index 000000000000..a8ea62fc9a35 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgImage.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties for producing a series of JPEG images from the input video. + /// + public partial class JpgImage + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgImage. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgImage. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JpgImage(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JpgImage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __image = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Image(json); + {_layer = If( json?.PropertyT("layers"), out var __jsonLayers) ? If( __jsonLayers as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.JpgLayer.FromJson(__u) )) ))() : null : Layer;} + {_spriteColumn = If( json?.PropertyT("spriteColumn"), out var __jsonSpriteColumn) ? (int?)__jsonSpriteColumn : SpriteColumn;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __image?.ToJson(container, serializationMode); + if (null != this._layer) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._layer ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("layers",__w); + } + AddIf( null != this._spriteColumn ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._spriteColumn) : null, "spriteColumn" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgLayer.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgLayer.cs new file mode 100644 index 000000000000..1a16c4535648 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgLayer.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the settings to produce a JPEG image from the input video. + public partial class JpgLayer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayerInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer __layer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Layer(); + + /// + /// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For + /// example 50% means the output video has half as many pixels in height as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Height { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Height; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Height = value ?? null; } + + /// + /// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming + /// the output file. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Label = value ?? null; } + + /// Backing field for property. + private int? _quality; + + /// + /// The compression quality of the JPEG output. Range is from 0-100 and the default is 70. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Quality { get => this._quality; set => this._quality = value; } + + /// + /// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example + /// 50% means the output video has half as many pixels in width as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Width { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Width; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Width = value ?? null; } + + /// Creates an new instance. + public JpgLayer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__layer), __layer); + await eventListener.AssertObjectIsValid(nameof(__layer), __layer); + } + } + /// Describes the settings to produce a JPEG image from the input video. + public partial interface IJpgLayer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer + { + /// + /// The compression quality of the JPEG output. Range is from 0-100 and the default is 70. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compression quality of the JPEG output. Range is from 0-100 and the default is 70.", + SerializedName = @"quality", + PossibleTypes = new [] { typeof(int) })] + int? Quality { get; set; } + + } + /// Describes the settings to produce a JPEG image from the input video. + internal partial interface IJpgLayerInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal + { + /// + /// The compression quality of the JPEG output. Range is from 0-100 and the default is 70. + /// + int? Quality { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgLayer.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgLayer.json.cs new file mode 100644 index 000000000000..e7e882e7a879 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/JpgLayer.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the settings to produce a JPEG image from the input video. + public partial class JpgLayer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgLayer FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new JpgLayer(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal JpgLayer(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __layer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Layer(json); + {_quality = If( json?.PropertyT("quality"), out var __jsonQuality) ? (int?)__jsonQuality : Quality;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __layer?.ToJson(container, serializationMode); + AddIf( null != this._quality ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._quality) : null, "quality" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyDelivery.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyDelivery.cs new file mode 100644 index 000000000000..609bae045319 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyDelivery.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class KeyDelivery : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDeliveryInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl _accessControl; + + /// The access control properties for Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl AccessControl { get => (this._accessControl = this._accessControl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AccessControl()); set => this._accessControl = value; } + + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControlInternal)AccessControl).DefaultAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControlInternal)AccessControl).DefaultAction = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction)""); } + + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string[] AccessControlIPAllowList { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControlInternal)AccessControl).IPAllowList; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControlInternal)AccessControl).IPAllowList = value ?? null /* arrayOf */; } + + /// Internal Acessors for AccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDeliveryInternal.AccessControl { get => (this._accessControl = this._accessControl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AccessControl()); set { {_accessControl = value;} } } + + /// Creates an new instance. + public KeyDelivery() + { + + } + } + public partial interface IKeyDelivery : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The behavior for IP access control in Key Delivery.", + SerializedName = @"defaultAction", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must be empty.", + SerializedName = @"ipAllowList", + PossibleTypes = new [] { typeof(string) })] + string[] AccessControlIPAllowList { get; set; } + + } + internal partial interface IKeyDeliveryInternal + + { + /// The access control properties for Key Delivery. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl AccessControl { get; set; } + /// The behavior for IP access control in Key Delivery. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + string[] AccessControlIPAllowList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyDelivery.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyDelivery.json.cs new file mode 100644 index 000000000000..6f330370a2ad --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyDelivery.json.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class KeyDelivery + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new KeyDelivery(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal KeyDelivery(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_accessControl = If( json?.PropertyT("accessControl"), out var __jsonAccessControl) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AccessControl.FromJson(__jsonAccessControl) : AccessControl;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._accessControl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._accessControl.ToJson(null,serializationMode) : null, "accessControl" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyVaultProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyVaultProperties.cs new file mode 100644 index 000000000000..d06d0012b326 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyVaultProperties.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class KeyVaultProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultPropertiesInternal + { + + /// Backing field for property. + private string _currentKeyIdentifier; + + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CurrentKeyIdentifier { get => this._currentKeyIdentifier; } + + /// Backing field for property. + private string _keyIdentifier; + + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string KeyIdentifier { get => this._keyIdentifier; set => this._keyIdentifier = value; } + + /// Internal Acessors for CurrentKeyIdentifier + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultPropertiesInternal.CurrentKeyIdentifier { get => this._currentKeyIdentifier; set { {_currentKeyIdentifier = value;} } } + + /// Creates an new instance. + public KeyVaultProperties() + { + + } + } + public partial interface IKeyVaultProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current key used to encrypt the Media Services account, including the key version.", + SerializedName = @"currentKeyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string CurrentKeyIdentifier { get; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key without a version (for example https://vault/keys/mykey).", + SerializedName = @"keyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string KeyIdentifier { get; set; } + + } + internal partial interface IKeyVaultPropertiesInternal + + { + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + string CurrentKeyIdentifier { get; set; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + string KeyIdentifier { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyVaultProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyVaultProperties.json.cs new file mode 100644 index 000000000000..a6319caa9518 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/KeyVaultProperties.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class KeyVaultProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new KeyVaultProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal KeyVaultProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_keyIdentifier = If( json?.PropertyT("keyIdentifier"), out var __jsonKeyIdentifier) ? (string)__jsonKeyIdentifier : (string)KeyIdentifier;} + {_currentKeyIdentifier = If( json?.PropertyT("currentKeyIdentifier"), out var __jsonCurrentKeyIdentifier) ? (string)__jsonCurrentKeyIdentifier : (string)CurrentKeyIdentifier;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._keyIdentifier)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._keyIdentifier.ToString()) : null, "keyIdentifier" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._currentKeyIdentifier)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._currentKeyIdentifier.ToString()) : null, "currentKeyIdentifier" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Layer.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Layer.cs new file mode 100644 index 000000000000..555913e9f83c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Layer.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// 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. + /// + public partial class Layer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal + { + + /// Backing field for property. + private string _height; + + /// + /// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For + /// example 50% means the output video has half as many pixels in height as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Height { get => this._height; set => this._height = value; } + + /// Backing field for property. + private string _label; + + /// + /// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming + /// the output file. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Label { get => this._label; set => this._label = value; } + + /// Backing field for property. + private string _width; + + /// + /// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example + /// 50% means the output video has half as many pixels in width as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Width { get => this._width; set => this._width = value; } + + /// Creates an new instance. + public Layer() + { + + } + } + /// 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. + public partial interface ILayer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For + /// example 50% means the output video has half as many pixels in height as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input.", + SerializedName = @"height", + PossibleTypes = new [] { typeof(string) })] + string Height { get; set; } + /// + /// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming + /// the output file. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file.", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string Label { get; set; } + /// + /// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example + /// 50% means the output video has half as many pixels in width as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input.", + SerializedName = @"width", + PossibleTypes = new [] { typeof(string) })] + string Width { get; set; } + + } + /// 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. + internal partial interface ILayerInternal + + { + /// + /// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For + /// example 50% means the output video has half as many pixels in height as the input. + /// + string Height { get; set; } + /// + /// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming + /// the output file. + /// + string Label { get; set; } + /// + /// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example + /// 50% means the output video has half as many pixels in width as the input. + /// + string Width { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Layer.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Layer.json.cs new file mode 100644 index 000000000000..08e9d5eefa8c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Layer.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// 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. + /// + public partial class Layer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Layer(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Layer(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_width = If( json?.PropertyT("width"), out var __jsonWidth) ? (string)__jsonWidth : (string)Width;} + {_height = If( json?.PropertyT("height"), out var __jsonHeight) ? (string)__jsonHeight : (string)Height;} + {_label = If( json?.PropertyT("label"), out var __jsonLabel) ? (string)__jsonLabel : (string)Label;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._width)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._width.ToString()) : null, "width" ,container.Add ); + AddIf( null != (((object)this._height)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._height.ToString()) : null, "height" ,container.Add ); + AddIf( null != (((object)this._label)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._label.ToString()) : null, "label" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ListEdgePoliciesInput.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ListEdgePoliciesInput.cs new file mode 100644 index 000000000000..f987ba6c2095 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ListEdgePoliciesInput.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class ListEdgePoliciesInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IListEdgePoliciesInput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IListEdgePoliciesInputInternal + { + + /// Backing field for property. + private string _deviceId; + + /// Unique identifier of the edge device. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DeviceId { get => this._deviceId; set => this._deviceId = value; } + + /// Creates an new instance. + public ListEdgePoliciesInput() + { + + } + } + public partial interface IListEdgePoliciesInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Unique identifier of the edge device. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Unique identifier of the edge device.", + SerializedName = @"deviceId", + PossibleTypes = new [] { typeof(string) })] + string DeviceId { get; set; } + + } + internal partial interface IListEdgePoliciesInputInternal + + { + /// Unique identifier of the edge device. + string DeviceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ListEdgePoliciesInput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ListEdgePoliciesInput.json.cs new file mode 100644 index 000000000000..a512b22a73e0 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ListEdgePoliciesInput.json.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class ListEdgePoliciesInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IListEdgePoliciesInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IListEdgePoliciesInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IListEdgePoliciesInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ListEdgePoliciesInput(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ListEdgePoliciesInput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deviceId = If( json?.PropertyT("deviceId"), out var __jsonDeviceId) ? (string)__jsonDeviceId : (string)DeviceId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._deviceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._deviceId.ToString()) : null, "deviceId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/LogSpecification.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/LogSpecification.cs new file mode 100644 index 000000000000..ea6477fbbad9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/LogSpecification.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A diagnostic log emitted by service. + public partial class LogSpecification : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecificationInternal + { + + /// Backing field for property. + private string _blobDuration; + + /// The time range for requests in each blob. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string BlobDuration { get => this._blobDuration; } + + /// Backing field for property. + private string _displayName; + + /// The diagnostic log category display name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; } + + /// Internal Acessors for BlobDuration + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecificationInternal.BlobDuration { get => this._blobDuration; set { {_blobDuration = value;} } } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecificationInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecificationInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// The diagnostic log category name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Creates an new instance. + public LogSpecification() + { + + } + } + /// A diagnostic log emitted by service. + public partial interface ILogSpecification : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The time range for requests in each blob. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The time range for requests in each blob.", + SerializedName = @"blobDuration", + PossibleTypes = new [] { typeof(string) })] + string BlobDuration { get; } + /// The diagnostic log category display name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The diagnostic log category display name.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// The diagnostic log category name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The diagnostic log category name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + + } + /// A diagnostic log emitted by service. + internal partial interface ILogSpecificationInternal + + { + /// The time range for requests in each blob. + string BlobDuration { get; set; } + /// The diagnostic log category display name. + string DisplayName { get; set; } + /// The diagnostic log category name. + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/LogSpecification.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/LogSpecification.json.cs new file mode 100644 index 000000000000..b8d1886f6708 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/LogSpecification.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A diagnostic log emitted by service. + public partial class LogSpecification + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LogSpecification(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LogSpecification(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_blobDuration = If( json?.PropertyT("blobDuration"), out var __jsonBlobDuration) ? (string)__jsonBlobDuration : (string)BlobDuration;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._blobDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._blobDuration.ToString()) : null, "blobDuration" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaService.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaService.cs new file mode 100644 index 000000000000..b58c2a9a433d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaService.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Media Services account. + public partial class MediaService : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.TrackedResource(); + + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).AccessControlDefaultAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).AccessControlDefaultAction = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction)""); } + + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string[] AccessControlIPAllowList { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).AccessControlIPAllowList; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).AccessControlIPAllowList = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// The current status of the Key Vault mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EncryptionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionStatus; } + + /// The type of key used to encrypt the Account Key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType? EncryptionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType)""); } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Id; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity _identity; + + /// The Managed Identity for the Media Services account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceIdentity()); set => this._identity = value; } + + /// The Principal ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).PrincipalId; } + + /// The Tenant ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).TenantId; } + + /// The identity type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).Type = value ?? null; } + + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? IdentityUseSystemAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).IdentityUseSystemAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).IdentityUseSystemAssignedIdentity = value ?? default(bool); } + + /// The user assigned managed identities. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string KeyVaultPropertyCurrentKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyCurrentKeyIdentifier; } + + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string KeyVaultPropertyKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyKeyIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyKeyIdentifier = value ?? null; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Location1 { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// The Media Services account ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string MediaServiceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).MediaServiceId; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Type = value; } + + /// Internal Acessors for Encryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).Encryption = value; } + + /// Internal Acessors for EncryptionIdentity + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.EncryptionIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionIdentity = value; } + + /// Internal Acessors for EncryptionKeyVaultProperty + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionKeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionKeyVaultProperty = value; } + + /// Internal Acessors for EncryptionStatus + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.EncryptionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionStatus = value; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).PrincipalId = value; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).TenantId = value; } + + /// Internal Acessors for KeyDelivery + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.KeyDelivery { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyDelivery; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyDelivery = value; } + + /// Internal Acessors for KeyDeliveryAccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.KeyDeliveryAccessControl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyDeliveryAccessControl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyDeliveryAccessControl = value; } + + /// Internal Acessors for KeyVaultPropertyCurrentKeyIdentifier + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.KeyVaultPropertyCurrentKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyCurrentKeyIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyCurrentKeyIdentifier = value; } + + /// Internal Acessors for MediaServiceId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.MediaServiceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).MediaServiceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).MediaServiceId = value; } + + /// Internal Acessors for PrivateEndpointConnection + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PrivateEndpointConnection = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Name; } + + /// The Private Endpoint Connections created for the Media Service account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PrivateEndpointConnection; } + + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PropertiesEncryptionIdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).IdentityUserAssignedIdentity = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties _property; + + /// The resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceProperties()); set => this._property = value; } + + /// Provisioning state of the Media Services account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).ProvisioningState; } + + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess)""); } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// The storage accounts for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).StorageAccount = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? StorageAuthentication { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).StorageAuthentication; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).StorageAuthentication = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Type; } + + /// Creates an new instance. + public MediaService() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); + } + if (headers.TryGetValues("Location", out var __locationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader1) is string __headerLocationHeader1 ? __headerLocationHeader1 : (string)null; + } + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader2)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader2) is string __headerAzureAsyncOperationHeader2 ? __headerAzureAsyncOperationHeader2 : (string)null; + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// A Media Services account. + public partial interface IMediaService : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource + { + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The behavior for IP access control in Key Delivery.", + SerializedName = @"defaultAction", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must be empty.", + SerializedName = @"ipAllowList", + PossibleTypes = new [] { typeof(string) })] + string[] AccessControlIPAllowList { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + /// The current status of the Key Vault mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current status of the Key Vault mapping.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string EncryptionStatus { get; } + /// The type of key used to encrypt the Account Key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of key used to encrypt the Account Key.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType? EncryptionType { get; set; } + /// The Principal ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Principal ID of the identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string IdentityPrincipalId { get; } + /// The Tenant ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Tenant ID of the identity.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string IdentityTenantId { get; } + /// The identity type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string IdentityType { get; set; } + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity.", + SerializedName = @"useSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identities. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user assigned managed identities.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current key used to encrypt the Media Services account, including the key version.", + SerializedName = @"currentKeyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultPropertyCurrentKeyIdentifier { get; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key without a version (for example https://vault/keys/mykey).", + SerializedName = @"keyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultPropertyKeyIdentifier { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// The Media Services account ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Media Services account ID.", + SerializedName = @"mediaServiceId", + PossibleTypes = new [] { typeof(string) })] + string MediaServiceId { get; } + /// The Private Endpoint Connections created for the Media Service account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Private Endpoint Connections created for the Media Service account.", + SerializedName = @"privateEndpointConnections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] PrivateEndpointConnection { get; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user assigned managed identity's ARM ID to use when accessing a resource.", + SerializedName = @"userAssignedIdentity", + PossibleTypes = new [] { typeof(string) })] + string PropertiesEncryptionIdentityUserAssignedIdentity { get; set; } + /// Provisioning state of the Media Services account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning state of the Media Services account.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; } + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether or not public network access is allowed for resources under the Media Services account.", + SerializedName = @"publicNetworkAccess", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// The storage accounts for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The storage accounts for this resource.", + SerializedName = @"storageAccounts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] StorageAccount { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"storageAuthentication", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? StorageAuthentication { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// A Media Services account. + internal partial interface IMediaServiceInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal + { + /// The behavior for IP access control in Key Delivery. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + string[] AccessControlIPAllowList { get; set; } + + string AzureAsyncOperation { get; set; } + /// The account encryption properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption Encryption { get; set; } + /// The Key Vault identity. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity EncryptionIdentity { get; set; } + /// The properties of the key used to encrypt the account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties EncryptionKeyVaultProperty { get; set; } + /// The current status of the Key Vault mapping. + string EncryptionStatus { get; set; } + /// The type of key used to encrypt the Account Key. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType? EncryptionType { get; set; } + /// The Managed Identity for the Media Services account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity Identity { get; set; } + /// The Principal ID of the identity. + string IdentityPrincipalId { get; set; } + /// The Tenant ID of the identity. + string IdentityTenantId { get; set; } + /// The identity type. + string IdentityType { get; set; } + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identities. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities IdentityUserAssignedIdentity { get; set; } + /// The Key Delivery properties for Media Services account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery KeyDelivery { get; set; } + /// The access control properties for Key Delivery. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl KeyDeliveryAccessControl { get; set; } + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + string KeyVaultPropertyCurrentKeyIdentifier { get; set; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + string KeyVaultPropertyKeyIdentifier { get; set; } + + string Location { get; set; } + /// The Media Services account ID. + string MediaServiceId { get; set; } + /// The Private Endpoint Connections created for the Media Service account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + string PropertiesEncryptionIdentityUserAssignedIdentity { get; set; } + /// The resource properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties Property { get; set; } + /// Provisioning state of the Media Services account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; set; } + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + + int? RetryAfter { get; set; } + /// The storage accounts for this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] StorageAccount { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? StorageAuthentication { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaService.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaService.json.cs new file mode 100644 index 000000000000..38ce145f3072 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaService.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Media Services account. + public partial class MediaService + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaService(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MediaService(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceIdentity.FromJson(__jsonIdentity) : Identity;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceCollection.cs new file mode 100644 index 000000000000..42085edabd8b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of MediaService items. + public partial class MediaServiceCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceCollectionInternal + { + + /// Backing field for property. + private string _odataNextLink; + + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService[] _value; + + /// A collection of MediaService items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public MediaServiceCollection() + { + + } + } + /// A collection of MediaService items. + public partial interface IMediaServiceCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A link to the next page of the collection (when the collection contains too many results to return in one response).", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// A collection of MediaService items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of MediaService items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService[] Value { get; set; } + + } + /// A collection of MediaService items. + internal partial interface IMediaServiceCollectionInternal + + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + string OdataNextLink { get; set; } + /// A collection of MediaService items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceCollection.json.cs new file mode 100644 index 000000000000..ef6b69c10d47 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceCollection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of MediaService items. + public partial class MediaServiceCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaServiceCollection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MediaServiceCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaService) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaService.FromJson(__u) )) ))() : null : Value;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceIdentity.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceIdentity.cs new file mode 100644 index 000000000000..1f5b3ba9acb4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceIdentity.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class MediaServiceIdentity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal + { + + /// Internal Acessors for PrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + + /// Internal Acessors for TenantId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + + /// Backing field for property. + private string _principalId; + + /// The Principal ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PrincipalId { get => this._principalId; } + + /// Backing field for property. + private string _tenantId; + + /// The Tenant ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string TenantId { get => this._tenantId; } + + /// Backing field for property. + private string _type; + + /// The identity type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities _userAssignedIdentity; + + /// The user assigned managed identities. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.UserAssignedManagedIdentities()); set => this._userAssignedIdentity = value; } + + /// Creates an new instance. + public MediaServiceIdentity() + { + + } + } + public partial interface IMediaServiceIdentity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The Principal ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Principal ID of the identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string PrincipalId { get; } + /// The Tenant ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Tenant ID of the identity.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string TenantId { get; } + /// The identity type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The identity type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + /// The user assigned managed identities. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user assigned managed identities.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities UserAssignedIdentity { get; set; } + + } + internal partial interface IMediaServiceIdentityInternal + + { + /// The Principal ID of the identity. + string PrincipalId { get; set; } + /// The Tenant ID of the identity. + string TenantId { get; set; } + /// The identity type. + string Type { get; set; } + /// The user assigned managed identities. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities UserAssignedIdentity { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceIdentity.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceIdentity.json.cs new file mode 100644 index 000000000000..5b7e2a616d92 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceIdentity.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class MediaServiceIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaServiceIdentity(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MediaServiceIdentity(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.UserAssignedManagedIdentities.FromJson(__jsonUserAssignedIdentities) : UserAssignedIdentity;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); + } + AddIf( null != this._userAssignedIdentity ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._userAssignedIdentity.ToJson(null,serializationMode) : null, "userAssignedIdentities" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceOperationStatus.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceOperationStatus.cs new file mode 100644 index 000000000000..dccd600cea0d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceOperationStatus.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Status of media service operation. + public partial class MediaServiceOperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatus, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatusInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// Operation end time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail _error; + + /// The error detail. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail()); set => this._error = value; } + + /// Backing field for property. + private string _id; + + /// Operation resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatusInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatusInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatusInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target = value; } + + /// Backing field for property. + private string _name; + + /// Operation identifier. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Operation start time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private string _status; + + /// Operation status. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public MediaServiceOperationStatus() + { + + } + } + /// Status of media service operation. + public partial interface IMediaServiceOperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; } + /// Operation end time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation end time.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// Operation resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// Operation identifier. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Operation identifier.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Operation start time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation start time.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// Operation status. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Operation status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Status of media service operation. + internal partial interface IMediaServiceOperationStatusInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; set; } + /// Operation end time. + global::System.DateTime? EndTime { get; set; } + /// The error detail. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Error { get; set; } + /// Operation resource ID. + string Id { get; set; } + /// The error message. + string Message { get; set; } + /// Operation identifier. + string Name { get; set; } + /// Operation start time. + global::System.DateTime? StartTime { get; set; } + /// Operation status. + string Status { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceOperationStatus.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceOperationStatus.json.cs new file mode 100644 index 000000000000..9ebeaec381b4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceOperationStatus.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Status of media service operation. + public partial class MediaServiceOperationStatus + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatus. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatus. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceOperationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaServiceOperationStatus(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MediaServiceOperationStatus(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceProperties.cs new file mode 100644 index 000000000000..66c5c7f44075 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceProperties.cs @@ -0,0 +1,337 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the Media Services account. + public partial class MediaServiceProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal + { + + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDeliveryInternal)KeyDelivery).AccessControlDefaultAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDeliveryInternal)KeyDelivery).AccessControlDefaultAction = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction)""); } + + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string[] AccessControlIPAllowList { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDeliveryInternal)KeyDelivery).AccessControlIPAllowList; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDeliveryInternal)KeyDelivery).AccessControlIPAllowList = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption _encryption; + + /// The account encryption properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AccountEncryption()); set => this._encryption = value; } + + /// The current status of the Key Vault mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EncryptionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).Status; } + + /// The type of key used to encrypt the Account Key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType? EncryptionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType)""); } + + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? IdentityUseSystemAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).IdentityUseSystemAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).IdentityUseSystemAssignedIdentity = value ?? default(bool); } + + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).IdentityUserAssignedIdentity = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery _keyDelivery; + + /// The Key Delivery properties for Media Services account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery KeyDelivery { get => (this._keyDelivery = this._keyDelivery ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.KeyDelivery()); set => this._keyDelivery = value; } + + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string KeyVaultPropertyCurrentKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).KeyVaultPropertyCurrentKeyIdentifier; } + + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string KeyVaultPropertyKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).KeyVaultPropertyKeyIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).KeyVaultPropertyKeyIdentifier = value ?? null; } + + /// Backing field for property. + private string _mediaServiceId; + + /// The Media Services account ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string MediaServiceId { get => this._mediaServiceId; } + + /// Internal Acessors for Encryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AccountEncryption()); set { {_encryption = value;} } } + + /// Internal Acessors for EncryptionIdentity + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.EncryptionIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).Identity = value; } + + /// Internal Acessors for EncryptionKeyVaultProperty + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).KeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).KeyVaultProperty = value; } + + /// Internal Acessors for EncryptionStatus + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.EncryptionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).Status = value; } + + /// Internal Acessors for KeyDelivery + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.KeyDelivery { get => (this._keyDelivery = this._keyDelivery ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.KeyDelivery()); set { {_keyDelivery = value;} } } + + /// Internal Acessors for KeyDeliveryAccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.KeyDeliveryAccessControl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDeliveryInternal)KeyDelivery).AccessControl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDeliveryInternal)KeyDelivery).AccessControl = value; } + + /// Internal Acessors for KeyVaultPropertyCurrentKeyIdentifier + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.KeyVaultPropertyCurrentKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).KeyVaultPropertyCurrentKeyIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryptionInternal)Encryption).KeyVaultPropertyCurrentKeyIdentifier = value; } + + /// Internal Acessors for MediaServiceId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.MediaServiceId { get => this._mediaServiceId; set { {_mediaServiceId = value;} } } + + /// Internal Acessors for PrivateEndpointConnection + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.PrivateEndpointConnection { get => this._privateEndpointConnection; set { {_privateEndpointConnection = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] _privateEndpointConnection; + + /// The Private Endpoint Connections created for the Media Service account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] PrivateEndpointConnection { get => this._privateEndpointConnection; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? _provisioningState; + + /// Provisioning state of the Media Services account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? _publicNetworkAccess; + + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] _storageAccount; + + /// The storage accounts for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] StorageAccount { get => this._storageAccount; set => this._storageAccount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? _storageAuthentication; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? StorageAuthentication { get => this._storageAuthentication; set => this._storageAuthentication = value; } + + /// Creates an new instance. + public MediaServiceProperties() + { + + } + } + /// Properties of the Media Services account. + public partial interface IMediaServiceProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The behavior for IP access control in Key Delivery.", + SerializedName = @"defaultAction", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must be empty.", + SerializedName = @"ipAllowList", + PossibleTypes = new [] { typeof(string) })] + string[] AccessControlIPAllowList { get; set; } + /// The current status of the Key Vault mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current status of the Key Vault mapping.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string EncryptionStatus { get; } + /// The type of key used to encrypt the Account Key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of key used to encrypt the Account Key.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType? EncryptionType { get; set; } + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity.", + SerializedName = @"useSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user assigned managed identity's ARM ID to use when accessing a resource.", + SerializedName = @"userAssignedIdentity", + PossibleTypes = new [] { typeof(string) })] + string IdentityUserAssignedIdentity { get; set; } + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current key used to encrypt the Media Services account, including the key version.", + SerializedName = @"currentKeyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultPropertyCurrentKeyIdentifier { get; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key without a version (for example https://vault/keys/mykey).", + SerializedName = @"keyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultPropertyKeyIdentifier { get; set; } + /// The Media Services account ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Media Services account ID.", + SerializedName = @"mediaServiceId", + PossibleTypes = new [] { typeof(string) })] + string MediaServiceId { get; } + /// The Private Endpoint Connections created for the Media Service account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Private Endpoint Connections created for the Media Service account.", + SerializedName = @"privateEndpointConnections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] PrivateEndpointConnection { get; } + /// Provisioning state of the Media Services account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning state of the Media Services account.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; } + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether or not public network access is allowed for resources under the Media Services account.", + SerializedName = @"publicNetworkAccess", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// The storage accounts for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The storage accounts for this resource.", + SerializedName = @"storageAccounts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] StorageAccount { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"storageAuthentication", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? StorageAuthentication { get; set; } + + } + /// Properties of the Media Services account. + internal partial interface IMediaServicePropertiesInternal + + { + /// The behavior for IP access control in Key Delivery. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + string[] AccessControlIPAllowList { get; set; } + /// The account encryption properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption Encryption { get; set; } + /// The Key Vault identity. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity EncryptionIdentity { get; set; } + /// The properties of the key used to encrypt the account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties EncryptionKeyVaultProperty { get; set; } + /// The current status of the Key Vault mapping. + string EncryptionStatus { get; set; } + /// The type of key used to encrypt the Account Key. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType? EncryptionType { get; set; } + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + string IdentityUserAssignedIdentity { get; set; } + /// The Key Delivery properties for Media Services account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery KeyDelivery { get; set; } + /// The access control properties for Key Delivery. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl KeyDeliveryAccessControl { get; set; } + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + string KeyVaultPropertyCurrentKeyIdentifier { get; set; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + string KeyVaultPropertyKeyIdentifier { get; set; } + /// The Media Services account ID. + string MediaServiceId { get; set; } + /// The Private Endpoint Connections created for the Media Service account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + /// Provisioning state of the Media Services account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; set; } + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// The storage accounts for this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] StorageAccount { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? StorageAuthentication { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceProperties.json.cs new file mode 100644 index 000000000000..ac13d8585973 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceProperties.json.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the Media Services account. + public partial class MediaServiceProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaServiceProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MediaServiceProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AccountEncryption.FromJson(__jsonEncryption) : Encryption;} + {_keyDelivery = If( json?.PropertyT("keyDelivery"), out var __jsonKeyDelivery) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.KeyDelivery.FromJson(__jsonKeyDelivery) : KeyDelivery;} + {_mediaServiceId = If( json?.PropertyT("mediaServiceId"), out var __jsonMediaServiceId) ? (string)__jsonMediaServiceId : (string)MediaServiceId;} + {_storageAccount = If( json?.PropertyT("storageAccounts"), out var __jsonStorageAccounts) ? If( __jsonStorageAccounts as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.StorageAccount.FromJson(__u) )) ))() : null : StorageAccount;} + {_storageAuthentication = If( json?.PropertyT("storageAuthentication"), out var __jsonStorageAuthentication) ? (string)__jsonStorageAuthentication : (string)StorageAuthentication;} + {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)PublicNetworkAccess;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_privateEndpointConnection = If( json?.PropertyT("privateEndpointConnections"), out var __jsonPrivateEndpointConnections) ? If( __jsonPrivateEndpointConnections as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.PrivateEndpointConnection.FromJson(__p) )) ))() : null : PrivateEndpointConnection;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._encryption ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._encryption.ToJson(null,serializationMode) : null, "encryption" ,container.Add ); + AddIf( null != this._keyDelivery ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._keyDelivery.ToJson(null,serializationMode) : null, "keyDelivery" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._mediaServiceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._mediaServiceId.ToString()) : null, "mediaServiceId" ,container.Add ); + } + if (null != this._storageAccount) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._storageAccount ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("storageAccounts",__w); + } + AddIf( null != (((object)this._storageAuthentication)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._storageAuthentication.ToString()) : null, "storageAuthentication" ,container.Add ); + AddIf( null != (((object)this._publicNetworkAccess)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._publicNetworkAccess.ToString()) : null, "publicNetworkAccess" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._privateEndpointConnection) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._privateEndpointConnection ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("privateEndpointConnections",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdate.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdate.cs new file mode 100644 index 000000000000..e58177495d3c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdate.cs @@ -0,0 +1,408 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Media Services account update. + public partial class MediaServiceUpdate : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdate, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal + { + + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).AccessControlDefaultAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).AccessControlDefaultAction = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction)""); } + + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string[] AccessControlIPAllowList { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).AccessControlIPAllowList; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).AccessControlIPAllowList = value ?? null /* arrayOf */; } + + /// The current status of the Key Vault mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EncryptionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionStatus; } + + /// The type of key used to encrypt the Account Key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType? EncryptionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity _identity; + + /// The Managed Identity for the Media Services account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceIdentity()); set => this._identity = value; } + + /// The Principal ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).PrincipalId; } + + /// The Tenant ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).TenantId; } + + /// The identity type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).Type = value ?? null; } + + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? IdentityUseSystemAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).IdentityUseSystemAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).IdentityUseSystemAssignedIdentity = value ?? default(bool); } + + /// The user assigned managed identities. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string KeyVaultPropertyCurrentKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyCurrentKeyIdentifier; } + + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string KeyVaultPropertyKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyKeyIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyKeyIdentifier = value ?? null; } + + /// The Media Services account ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string MediaServiceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).MediaServiceId; } + + /// Internal Acessors for Encryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).Encryption = value; } + + /// Internal Acessors for EncryptionIdentity + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.EncryptionIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionIdentity = value; } + + /// Internal Acessors for EncryptionKeyVaultProperty + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionKeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionKeyVaultProperty = value; } + + /// Internal Acessors for EncryptionStatus + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.EncryptionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).EncryptionStatus = value; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).PrincipalId = value; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentityInternal)Identity).TenantId = value; } + + /// Internal Acessors for KeyDelivery + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.KeyDelivery { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyDelivery; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyDelivery = value; } + + /// Internal Acessors for KeyDeliveryAccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.KeyDeliveryAccessControl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyDeliveryAccessControl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyDeliveryAccessControl = value; } + + /// Internal Acessors for KeyVaultPropertyCurrentKeyIdentifier + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.KeyVaultPropertyCurrentKeyIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyCurrentKeyIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).KeyVaultPropertyCurrentKeyIdentifier = value; } + + /// Internal Acessors for MediaServiceId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.MediaServiceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).MediaServiceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).MediaServiceId = value; } + + /// Internal Acessors for PrivateEndpointConnection + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PrivateEndpointConnection = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).ProvisioningState = value; } + + /// The Private Endpoint Connections created for the Media Service account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PrivateEndpointConnection; } + + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PropertiesEncryptionIdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).IdentityUserAssignedIdentity = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties _property; + + /// The resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceProperties()); set => this._property = value; } + + /// Provisioning state of the Media Services account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).ProvisioningState; } + + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess)""); } + + /// The storage accounts for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).StorageAccount = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? StorageAuthentication { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).StorageAuthentication; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServicePropertiesInternal)Property).StorageAuthentication = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceUpdateTags()); set => this._tag = value; } + + /// Creates an new instance. + public MediaServiceUpdate() + { + + } + } + /// A Media Services account update. + public partial interface IMediaServiceUpdate : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The behavior for IP access control in Key Delivery. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The behavior for IP access control in Key Delivery.", + SerializedName = @"defaultAction", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must be empty.", + SerializedName = @"ipAllowList", + PossibleTypes = new [] { typeof(string) })] + string[] AccessControlIPAllowList { get; set; } + /// The current status of the Key Vault mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current status of the Key Vault mapping.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string EncryptionStatus { get; } + /// The type of key used to encrypt the Account Key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of key used to encrypt the Account Key.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType? EncryptionType { get; set; } + /// The Principal ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Principal ID of the identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string IdentityPrincipalId { get; } + /// The Tenant ID of the identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Tenant ID of the identity.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string IdentityTenantId { get; } + /// The identity type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string IdentityType { get; set; } + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity.", + SerializedName = @"useSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identities. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user assigned managed identities.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current key used to encrypt the Media Services account, including the key version.", + SerializedName = @"currentKeyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultPropertyCurrentKeyIdentifier { get; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key without a version (for example https://vault/keys/mykey).", + SerializedName = @"keyIdentifier", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultPropertyKeyIdentifier { get; set; } + /// The Media Services account ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Media Services account ID.", + SerializedName = @"mediaServiceId", + PossibleTypes = new [] { typeof(string) })] + string MediaServiceId { get; } + /// The Private Endpoint Connections created for the Media Service account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Private Endpoint Connections created for the Media Service account.", + SerializedName = @"privateEndpointConnections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] PrivateEndpointConnection { get; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user assigned managed identity's ARM ID to use when accessing a resource.", + SerializedName = @"userAssignedIdentity", + PossibleTypes = new [] { typeof(string) })] + string PropertiesEncryptionIdentityUserAssignedIdentity { get; set; } + /// Provisioning state of the Media Services account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning state of the Media Services account.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; } + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether or not public network access is allowed for resources under the Media Services account.", + SerializedName = @"publicNetworkAccess", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// The storage accounts for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The storage accounts for this resource.", + SerializedName = @"storageAccounts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] StorageAccount { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"storageAuthentication", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? StorageAuthentication { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTags Tag { get; set; } + + } + /// A Media Services account update. + internal partial interface IMediaServiceUpdateInternal + + { + /// The behavior for IP access control in Key Delivery. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction? AccessControlDefaultAction { get; set; } + /// + /// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must + /// be empty. + /// + string[] AccessControlIPAllowList { get; set; } + /// The account encryption properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccountEncryption Encryption { get; set; } + /// The Key Vault identity. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity EncryptionIdentity { get; set; } + /// The properties of the key used to encrypt the account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyVaultProperties EncryptionKeyVaultProperty { get; set; } + /// The current status of the Key Vault mapping. + string EncryptionStatus { get; set; } + /// The type of key used to encrypt the Account Key. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType? EncryptionType { get; set; } + /// The Managed Identity for the Media Services account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceIdentity Identity { get; set; } + /// The Principal ID of the identity. + string IdentityPrincipalId { get; set; } + /// The Tenant ID of the identity. + string IdentityTenantId { get; set; } + /// The identity type. + string IdentityType { get; set; } + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identities. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities IdentityUserAssignedIdentity { get; set; } + /// The Key Delivery properties for Media Services account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IKeyDelivery KeyDelivery { get; set; } + /// The access control properties for Key Delivery. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAccessControl KeyDeliveryAccessControl { get; set; } + /// + /// The current key used to encrypt the Media Services account, including the key version. + /// + string KeyVaultPropertyCurrentKeyIdentifier { get; set; } + /// + /// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) + /// or reference a key without a version (for example https://vault/keys/mykey). + /// + string KeyVaultPropertyKeyIdentifier { get; set; } + /// The Media Services account ID. + string MediaServiceId { get; set; } + /// The Private Endpoint Connections created for the Media Service account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + string PropertiesEncryptionIdentityUserAssignedIdentity { get; set; } + /// The resource properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceProperties Property { get; set; } + /// Provisioning state of the Media Services account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; set; } + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// The storage accounts for this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount[] StorageAccount { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication? StorageAuthentication { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdate.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdate.json.cs new file mode 100644 index 000000000000..327717dfcc0f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdate.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Media Services account update. + public partial class MediaServiceUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaServiceUpdate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MediaServiceUpdate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceProperties.FromJson(__jsonProperties) : Property;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceIdentity.FromJson(__jsonIdentity) : Identity;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceUpdateTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.cs new file mode 100644 index 000000000000..f2dee55dcba7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Resource tags. + public partial class MediaServiceUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTagsInternal + { + + /// Creates an new instance. + public MediaServiceUpdateTags() + { + + } + } + /// Resource tags. + public partial interface IMediaServiceUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface IMediaServiceUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.dictionary.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.dictionary.cs new file mode 100644 index 000000000000..d14c2f0757cd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class MediaServiceUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MediaServiceUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.json.cs new file mode 100644 index 000000000000..15f837d9947f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MediaServiceUpdateTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Resource tags. + public partial class MediaServiceUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMediaServiceUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaServiceUpdateTags(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + /// + internal MediaServiceUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricDimension.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricDimension.cs new file mode 100644 index 000000000000..6cd17e0e0cbf --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricDimension.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A metric dimension. + public partial class MetricDimension : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimensionInternal + { + + /// Backing field for property. + private string _displayName; + + /// The display name for the dimension. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimensionInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimensionInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for ToBeExportedForShoebox + bool? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimensionInternal.ToBeExportedForShoebox { get => this._toBeExportedForShoebox; set { {_toBeExportedForShoebox = value;} } } + + /// Backing field for property. + private string _name; + + /// The metric dimension name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private bool? _toBeExportedForShoebox; + + /// Whether to export metric to shoebox. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? ToBeExportedForShoebox { get => this._toBeExportedForShoebox; } + + /// Creates an new instance. + public MetricDimension() + { + + } + } + /// A metric dimension. + public partial interface IMetricDimension : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The display name for the dimension. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The display name for the dimension.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// The metric dimension name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The metric dimension name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// Whether to export metric to shoebox. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Whether to export metric to shoebox.", + SerializedName = @"toBeExportedForShoebox", + PossibleTypes = new [] { typeof(bool) })] + bool? ToBeExportedForShoebox { get; } + + } + /// A metric dimension. + internal partial interface IMetricDimensionInternal + + { + /// The display name for the dimension. + string DisplayName { get; set; } + /// The metric dimension name. + string Name { get; set; } + /// Whether to export metric to shoebox. + bool? ToBeExportedForShoebox { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricDimension.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricDimension.json.cs new file mode 100644 index 000000000000..f87652b25f32 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricDimension.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A metric dimension. + public partial class MetricDimension + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MetricDimension(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MetricDimension(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_toBeExportedForShoebox = If( json?.PropertyT("toBeExportedForShoebox"), out var __jsonToBeExportedForShoebox) ? (bool?)__jsonToBeExportedForShoebox : ToBeExportedForShoebox;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._toBeExportedForShoebox ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._toBeExportedForShoebox) : null, "toBeExportedForShoebox" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricSpecification.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricSpecification.cs new file mode 100644 index 000000000000..0d79ee6a7bfa --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricSpecification.cs @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A metric emitted by service. + public partial class MetricSpecification : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? _aggregationType; + + /// The metric aggregation type + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? AggregationType { get => this._aggregationType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension[] _dimension; + + /// The metric dimensions. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension[] Dimension { get => this._dimension; } + + /// Backing field for property. + private string _displayDescription; + + /// The metric display description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DisplayDescription { get => this._displayDescription; } + + /// Backing field for property. + private string _displayName; + + /// The metric display name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; } + + /// Backing field for property. + private bool? _enableRegionalMdmAccount; + + /// Indicates whether regional MDM account is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? EnableRegionalMdmAccount { get => this._enableRegionalMdmAccount; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? _lockAggregationType; + + /// The metric lock aggregation type + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? LockAggregationType { get => this._lockAggregationType; } + + /// Internal Acessors for AggregationType + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.AggregationType { get => this._aggregationType; set { {_aggregationType = value;} } } + + /// Internal Acessors for Dimension + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.Dimension { get => this._dimension; set { {_dimension = value;} } } + + /// Internal Acessors for DisplayDescription + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.DisplayDescription { get => this._displayDescription; set { {_displayDescription = value;} } } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + + /// Internal Acessors for EnableRegionalMdmAccount + bool? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.EnableRegionalMdmAccount { get => this._enableRegionalMdmAccount; set { {_enableRegionalMdmAccount = value;} } } + + /// Internal Acessors for LockAggregationType + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.LockAggregationType { get => this._lockAggregationType; set { {_lockAggregationType = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SourceMdmAccount + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.SourceMdmAccount { get => this._sourceMdmAccount; set { {_sourceMdmAccount = value;} } } + + /// Internal Acessors for SourceMdmNamespace + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.SourceMdmNamespace { get => this._sourceMdmNamespace; set { {_sourceMdmNamespace = value;} } } + + /// Internal Acessors for SupportedTimeGrainType + string[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.SupportedTimeGrainType { get => this._supportedTimeGrainType; set { {_supportedTimeGrainType = value;} } } + + /// Internal Acessors for Unit + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecificationInternal.Unit { get => this._unit; set { {_unit = value;} } } + + /// Backing field for property. + private string _name; + + /// The metric name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _sourceMdmAccount; + + /// The source MDM account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string SourceMdmAccount { get => this._sourceMdmAccount; } + + /// Backing field for property. + private string _sourceMdmNamespace; + + /// The source MDM namespace. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string SourceMdmNamespace { get => this._sourceMdmNamespace; } + + /// Backing field for property. + private string[] _supportedAggregationType; + + /// Supported aggregation types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] SupportedAggregationType { get => this._supportedAggregationType; set => this._supportedAggregationType = value; } + + /// Backing field for property. + private string[] _supportedTimeGrainType; + + /// The supported time grain types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] SupportedTimeGrainType { get => this._supportedTimeGrainType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit? _unit; + + /// The metric unit + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit? Unit { get => this._unit; } + + /// Creates an new instance. + public MetricSpecification() + { + + } + } + /// A metric emitted by service. + public partial interface IMetricSpecification : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The metric aggregation type + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The metric aggregation type", + SerializedName = @"aggregationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? AggregationType { get; } + /// The metric dimensions. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The metric dimensions.", + SerializedName = @"dimensions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension[] Dimension { get; } + /// The metric display description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The metric display description.", + SerializedName = @"displayDescription", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; } + /// The metric display name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The metric display name.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// Indicates whether regional MDM account is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether regional MDM account is enabled.", + SerializedName = @"enableRegionalMdmAccount", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableRegionalMdmAccount { get; } + /// The metric lock aggregation type + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The metric lock aggregation type", + SerializedName = @"lockAggregationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? LockAggregationType { get; } + /// The metric name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The metric name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The source MDM account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The source MDM account.", + SerializedName = @"sourceMdmAccount", + PossibleTypes = new [] { typeof(string) })] + string SourceMdmAccount { get; } + /// The source MDM namespace. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The source MDM namespace.", + SerializedName = @"sourceMdmNamespace", + PossibleTypes = new [] { typeof(string) })] + string SourceMdmNamespace { get; } + /// Supported aggregation types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Supported aggregation types.", + SerializedName = @"supportedAggregationTypes", + PossibleTypes = new [] { typeof(string) })] + string[] SupportedAggregationType { get; set; } + /// The supported time grain types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The supported time grain types.", + SerializedName = @"supportedTimeGrainTypes", + PossibleTypes = new [] { typeof(string) })] + string[] SupportedTimeGrainType { get; } + /// The metric unit + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The metric unit", + SerializedName = @"unit", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit? Unit { get; } + + } + /// A metric emitted by service. + internal partial interface IMetricSpecificationInternal + + { + /// The metric aggregation type + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? AggregationType { get; set; } + /// The metric dimensions. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension[] Dimension { get; set; } + /// The metric display description. + string DisplayDescription { get; set; } + /// The metric display name. + string DisplayName { get; set; } + /// Indicates whether regional MDM account is enabled. + bool? EnableRegionalMdmAccount { get; set; } + /// The metric lock aggregation type + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType? LockAggregationType { get; set; } + /// The metric name. + string Name { get; set; } + /// The source MDM account. + string SourceMdmAccount { get; set; } + /// The source MDM namespace. + string SourceMdmNamespace { get; set; } + /// Supported aggregation types. + string[] SupportedAggregationType { get; set; } + /// The supported time grain types. + string[] SupportedTimeGrainType { get; set; } + /// The metric unit + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit? Unit { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricSpecification.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricSpecification.json.cs new file mode 100644 index 000000000000..d65a15dcbb6b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MetricSpecification.json.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A metric emitted by service. + public partial class MetricSpecification + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MetricSpecification(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MetricSpecification(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_displayDescription = If( json?.PropertyT("displayDescription"), out var __jsonDisplayDescription) ? (string)__jsonDisplayDescription : (string)DisplayDescription;} + {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit;} + {_aggregationType = If( json?.PropertyT("aggregationType"), out var __jsonAggregationType) ? (string)__jsonAggregationType : (string)AggregationType;} + {_lockAggregationType = If( json?.PropertyT("lockAggregationType"), out var __jsonLockAggregationType) ? (string)__jsonLockAggregationType : (string)LockAggregationType;} + {_supportedAggregationType = If( json?.PropertyT("supportedAggregationTypes"), out var __jsonSupportedAggregationTypes) ? If( __jsonSupportedAggregationTypes as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : SupportedAggregationType;} + {_dimension = If( json?.PropertyT("dimensions"), out var __jsonDimensions) ? If( __jsonDimensions as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricDimension) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MetricDimension.FromJson(__p) )) ))() : null : Dimension;} + {_enableRegionalMdmAccount = If( json?.PropertyT("enableRegionalMdmAccount"), out var __jsonEnableRegionalMdmAccount) ? (bool?)__jsonEnableRegionalMdmAccount : EnableRegionalMdmAccount;} + {_sourceMdmAccount = If( json?.PropertyT("sourceMdmAccount"), out var __jsonSourceMdmAccount) ? (string)__jsonSourceMdmAccount : (string)SourceMdmAccount;} + {_sourceMdmNamespace = If( json?.PropertyT("sourceMdmNamespace"), out var __jsonSourceMdmNamespace) ? (string)__jsonSourceMdmNamespace : (string)SourceMdmNamespace;} + {_supportedTimeGrainType = If( json?.PropertyT("supportedTimeGrainTypes"), out var __jsonSupportedTimeGrainTypes) ? If( __jsonSupportedTimeGrainTypes as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : SupportedTimeGrainType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._displayDescription)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._displayDescription.ToString()) : null, "displayDescription" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._aggregationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._aggregationType.ToString()) : null, "aggregationType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lockAggregationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lockAggregationType.ToString()) : null, "lockAggregationType" ,container.Add ); + } + if (null != this._supportedAggregationType) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._supportedAggregationType ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("supportedAggregationTypes",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._dimension) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._dimension ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("dimensions",__r); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._enableRegionalMdmAccount ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._enableRegionalMdmAccount) : null, "enableRegionalMdmAccount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._sourceMdmAccount)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._sourceMdmAccount.ToString()) : null, "sourceMdmAccount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._sourceMdmNamespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._sourceMdmNamespace.ToString()) : null, "sourceMdmNamespace" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._supportedTimeGrainType) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __n in this._supportedTimeGrainType ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("supportedTimeGrainTypes",__m); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Mp4Format.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Mp4Format.cs new file mode 100644 index 000000000000..e69517b3f981 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Mp4Format.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the properties for an output ISO MP4 file. + public partial class Mp4Format : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMp4Format, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMp4FormatInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat __multiBitrateFormat = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MultiBitrateFormat(); + + /// + /// The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} + /// - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) + /// of the input video file is less than 32 characters long, the base name of input video files will be used. If the length + /// of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total + /// length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} + /// - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + /// thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros + /// will be collapsed and removed from the filename. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string FilenamePattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__multiBitrateFormat).FilenamePattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__multiBitrateFormat).FilenamePattern = value ; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__multiBitrateFormat).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__multiBitrateFormat).OdataType = value ; } + + /// + /// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together + /// . + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile[] OutputFile { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormatInternal)__multiBitrateFormat).OutputFile; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormatInternal)__multiBitrateFormat).OutputFile = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public Mp4Format() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__multiBitrateFormat), __multiBitrateFormat); + await eventListener.AssertObjectIsValid(nameof(__multiBitrateFormat), __multiBitrateFormat); + } + } + /// Describes the properties for an output ISO MP4 file. + public partial interface IMp4Format : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat + { + + } + /// Describes the properties for an output ISO MP4 file. + internal partial interface IMp4FormatInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormatInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Mp4Format.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Mp4Format.json.cs new file mode 100644 index 000000000000..67fba924740b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Mp4Format.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the properties for an output ISO MP4 file. + public partial class Mp4Format + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMp4Format. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMp4Format. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMp4Format FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Mp4Format(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Mp4Format(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __multiBitrateFormat = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MultiBitrateFormat(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __multiBitrateFormat?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MultiBitrateFormat.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MultiBitrateFormat.cs new file mode 100644 index 000000000000..db603c13edda --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MultiBitrateFormat.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to produce + /// one output file for each video layer which is muxed together with all the audios. The exact output files produced can + /// be controlled by specifying the outputFiles collection. + /// + public partial class MultiBitrateFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormatInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat __format = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Format(); + + /// + /// The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} + /// - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) + /// of the input video file is less than 32 characters long, the base name of input video files will be used. If the length + /// of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total + /// length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} + /// - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + /// thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros + /// will be collapsed and removed from the filename. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string FilenamePattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).FilenamePattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).FilenamePattern = value ; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile[] _outputFile; + + /// + /// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together + /// . + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile[] OutputFile { get => this._outputFile; set => this._outputFile = value; } + + /// Creates an new instance. + public MultiBitrateFormat() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__format), __format); + await eventListener.AssertObjectIsValid(nameof(__format), __format); + } + } + /// Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to produce + /// one output file for each video layer which is muxed together with all the audios. The exact output files produced can + /// be controlled by specifying the outputFiles collection. + public partial interface IMultiBitrateFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat + { + /// + /// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together + /// . + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together .", + SerializedName = @"outputFiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile[] OutputFile { get; set; } + + } + /// Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to produce + /// one output file for each video layer which is muxed together with all the audios. The exact output files produced can + /// be controlled by specifying the outputFiles collection. + internal partial interface IMultiBitrateFormatInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal + { + /// + /// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together + /// . + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile[] OutputFile { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/MultiBitrateFormat.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/MultiBitrateFormat.json.cs new file mode 100644 index 000000000000..4df2bee5512a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/MultiBitrateFormat.json.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to produce + /// one output file for each video layer which is muxed together with all the audios. The exact output files produced can + /// be controlled by specifying the outputFiles collection. + /// + public partial class MultiBitrateFormat + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.Mp4Format": + { + return new Mp4Format(json); + } + case "#Microsoft.Media.TransportStreamFormat": + { + return new TransportStreamFormat(json); + } + } + return new MultiBitrateFormat(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MultiBitrateFormat(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __format = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Format(json); + {_outputFile = If( json?.PropertyT("outputFiles"), out var __jsonOutputFiles) ? If( __jsonOutputFiles as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.OutputFile.FromJson(__u) )) ))() : null : OutputFile;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __format?.ToJson(container, serializationMode); + if (null != this._outputFile) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._outputFile ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("outputFiles",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Operation.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Operation.cs new file mode 100644 index 000000000000..7ec4539b2ed8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Operation.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An operation. + public partial class Operation : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType? _actionType; + + /// Indicates the action type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType? ActionType { get => this._actionType; set => this._actionType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplay _display; + + /// The operation display name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.OperationDisplay()); set => this._display = value; } + + /// The operation description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplayInternal)Display).Description = value ?? null; } + + /// The operation type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplayInternal)Display).Operation = value ?? null; } + + /// The service provider. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplayInternal)Display).Provider = value ?? null; } + + /// Resource on which the operation is performed. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplayInternal)Display).Resource = value ?? null; } + + /// Backing field for property. + private bool? _isDataAction; + + /// Whether the operation applies to data-plane. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? IsDataAction { get => this._isDataAction; set => this._isDataAction = value; } + + /// Internal Acessors for Display + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.OperationDisplay()); set { {_display = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Properties()); set { {_property = value;} } } + + /// Internal Acessors for ServiceSpecification + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationInternal.ServiceSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal)Property).ServiceSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal)Property).ServiceSpecification = value; } + + /// Internal Acessors for ServiceSpecificationLogSpecification + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationInternal.ServiceSpecificationLogSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal)Property).ServiceSpecificationLogSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal)Property).ServiceSpecificationLogSpecification = value; } + + /// Internal Acessors for ServiceSpecificationMetricSpecification + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationInternal.ServiceSpecificationMetricSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal)Property).ServiceSpecificationMetricSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal)Property).ServiceSpecificationMetricSpecification = value; } + + /// Backing field for property. + private string _name; + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _origin; + + /// Origin of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Origin { get => this._origin; set => this._origin = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IProperties _property; + + /// Operation properties format. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Properties()); set => this._property = value; } + + /// List of log specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] ServiceSpecificationLogSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal)Property).ServiceSpecificationLogSpecification; } + + /// List of metric specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] ServiceSpecificationMetricSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal)Property).ServiceSpecificationMetricSpecification; } + + /// Creates an new instance. + public Operation() + { + + } + } + /// An operation. + public partial interface IOperation : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Indicates the action type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the action type.", + SerializedName = @"actionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType? ActionType { get; set; } + /// The operation description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operation description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; set; } + /// The operation type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operation type.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string DisplayOperation { get; set; } + /// The service provider. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The service provider.", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string DisplayProvider { get; set; } + /// Resource on which the operation is performed. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource on which the operation is performed.", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string DisplayResource { get; set; } + /// Whether the operation applies to data-plane. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the operation applies to data-plane.", + SerializedName = @"isDataAction", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDataAction { get; set; } + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The operation name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Origin of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Origin of the operation.", + SerializedName = @"origin", + PossibleTypes = new [] { typeof(string) })] + string Origin { get; set; } + /// List of log specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of log specifications.", + SerializedName = @"logSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] ServiceSpecificationLogSpecification { get; } + /// List of metric specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of metric specifications.", + SerializedName = @"metricSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] ServiceSpecificationMetricSpecification { get; } + + } + /// An operation. + internal partial interface IOperationInternal + + { + /// Indicates the action type. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType? ActionType { get; set; } + /// The operation display name. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplay Display { get; set; } + /// The operation description. + string DisplayDescription { get; set; } + /// The operation type. + string DisplayOperation { get; set; } + /// The service provider. + string DisplayProvider { get; set; } + /// Resource on which the operation is performed. + string DisplayResource { get; set; } + /// Whether the operation applies to data-plane. + bool? IsDataAction { get; set; } + /// The operation name. + string Name { get; set; } + /// Origin of the operation. + string Origin { get; set; } + /// Operation properties format. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IProperties Property { get; set; } + /// The service specifications. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification ServiceSpecification { get; set; } + /// List of log specifications. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] ServiceSpecificationLogSpecification { get; set; } + /// List of metric specifications. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] ServiceSpecificationMetricSpecification { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Operation.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Operation.json.cs new file mode 100644 index 000000000000..08029bac9788 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Operation.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An operation. + public partial class Operation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Operation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Operation(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.OperationDisplay.FromJson(__jsonDisplay) : Display;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Properties.FromJson(__jsonProperties) : Property;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} + {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)ActionType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); + AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); + AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationCollection.cs new file mode 100644 index 000000000000..98b30e16efc3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationCollection.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of Operation items. + public partial class OperationCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationCollectionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation[] _value; + + /// A collection of Operation items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public OperationCollection() + { + + } + } + /// A collection of Operation items. + public partial interface IOperationCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// A collection of Operation items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of Operation items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation[] Value { get; set; } + + } + /// A collection of Operation items. + internal partial interface IOperationCollectionInternal + + { + /// A collection of Operation items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationCollection.json.cs new file mode 100644 index 000000000000..996e35c5634e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationCollection.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of Operation items. + public partial class OperationCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new OperationCollection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal OperationCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Operation.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationDisplay.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationDisplay.cs new file mode 100644 index 000000000000..5bf1323aa073 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationDisplay.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Operation details. + public partial class OperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplayInternal + { + + /// Backing field for property. + private string _description; + + /// The operation description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _operation; + + /// The operation type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Operation { get => this._operation; set => this._operation = value; } + + /// Backing field for property. + private string _provider; + + /// The service provider. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Provider { get => this._provider; set => this._provider = value; } + + /// Backing field for property. + private string _resource; + + /// Resource on which the operation is performed. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Resource { get => this._resource; set => this._resource = value; } + + /// Creates an new instance. + public OperationDisplay() + { + + } + } + /// Operation details. + public partial interface IOperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The operation description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operation description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The operation type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operation type.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; set; } + /// The service provider. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The service provider.", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string Provider { get; set; } + /// Resource on which the operation is performed. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource on which the operation is performed.", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; set; } + + } + /// Operation details. + internal partial interface IOperationDisplayInternal + + { + /// The operation description. + string Description { get; set; } + /// The operation type. + string Operation { get; set; } + /// The service provider. + string Provider { get; set; } + /// Resource on which the operation is performed. + string Resource { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationDisplay.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationDisplay.json.cs new file mode 100644 index 000000000000..42168d3b6024 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/OperationDisplay.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Operation details. + public partial class OperationDisplay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/OutputFile.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/OutputFile.cs new file mode 100644 index 000000000000..5a7f4bc77221 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/OutputFile.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents an output file produced. + public partial class OutputFile : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFileInternal + { + + /// Backing field for property. + private string[] _label; + + /// + /// The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if + /// the encoder is producing two video layers with labels v1 and v2, and one audio layer with label a1, then an array like + /// '[v1, a1]' tells the encoder to produce an output file with the video track represented by v1 and the audio track represented + /// by a1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] Label { get => this._label; set => this._label = value; } + + /// Creates an new instance. + public OutputFile() + { + + } + } + /// Represents an output file produced. + public partial interface IOutputFile : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if + /// the encoder is producing two video layers with labels v1 and v2, and one audio layer with label a1, then an array like + /// '[v1, a1]' tells the encoder to produce an output file with the video track represented by v1 and the audio track represented + /// by a1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels v1 and v2, and one audio layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video track represented by v1 and the audio track represented by a1.", + SerializedName = @"labels", + PossibleTypes = new [] { typeof(string) })] + string[] Label { get; set; } + + } + /// Represents an output file produced. + internal partial interface IOutputFileInternal + + { + /// + /// The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if + /// the encoder is producing two video layers with labels v1 and v2, and one audio layer with label a1, then an array like + /// '[v1, a1]' tells the encoder to produce an output file with the video track represented by v1 and the audio track represented + /// by a1. + /// + string[] Label { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/OutputFile.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/OutputFile.json.cs new file mode 100644 index 000000000000..9b3f05f8e3b6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/OutputFile.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents an output file produced. + public partial class OutputFile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new OutputFile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal OutputFile(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_label = If( json?.PropertyT("labels"), out var __jsonLabels) ? If( __jsonLabels as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Label;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._label) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._label ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("labels",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Overlay.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Overlay.cs new file mode 100644 index 000000000000..45d8aa5e166e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Overlay.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Base type for all overlays - image, audio or video. + public partial class Overlay : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal + { + + /// Backing field for property. + private double? _audioGainLevel; + + /// + /// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public double? AudioGainLevel { get => this._audioGainLevel; set => this._audioGainLevel = value; } + + /// Backing field for property. + private global::System.TimeSpan? _end; + + /// + /// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format. + /// For example, PT30S to end the overlay at 30 seconds into the input video. If not specified or the value is greater than + /// the input video duration, the overlay will be applied until the end of the input video if the overlay media duration is + /// greater than the input video duration, else the overlay will last as long as the overlay media duration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? End { get => this._end; set => this._end = value; } + + /// Backing field for property. + private global::System.TimeSpan? _fadeInDuration; + + /// + /// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade in (same as PT0S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? FadeInDuration { get => this._fadeInDuration; set => this._fadeInDuration = value; } + + /// Backing field for property. + private global::System.TimeSpan? _fadeOutDuration; + + /// + /// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade out (same as PT0S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? FadeOutDuration { get => this._fadeOutDuration; set => this._fadeOutDuration = value; } + + /// Backing field for property. + private string _inputLabel; + + /// + /// The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify + /// an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. + /// See https://aka.ms/mesformats for the complete list of supported audio and video file formats. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string InputLabel { get => this._inputLabel; set => this._inputLabel = value; } + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Backing field for property. + private global::System.TimeSpan? _start; + + /// + /// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. + /// For example, PT05S to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the + /// beginning of the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? Start { get => this._start; set => this._start = value; } + + /// Creates an new instance. + public Overlay() + { + + } + } + /// Base type for all overlays - image, audio or video. + public partial interface IOverlay : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0.", + SerializedName = @"audioGainLevel", + PossibleTypes = new [] { typeof(double) })] + double? AudioGainLevel { get; set; } + /// + /// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format. + /// For example, PT30S to end the overlay at 30 seconds into the input video. If not specified or the value is greater than + /// the input video duration, the overlay will be applied until the end of the input video if the overlay media duration is + /// greater than the input video duration, else the overlay will last as long as the overlay media duration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format. For example, PT30S to end the overlay at 30 seconds into the input video. If not specified or the value is greater than the input video duration, the overlay will be applied until the end of the input video if the overlay media duration is greater than the input video duration, else the overlay will last as long as the overlay media duration.", + SerializedName = @"end", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? End { get; set; } + /// + /// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade in (same as PT0S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as PT0S).", + SerializedName = @"fadeInDuration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? FadeInDuration { get; set; } + /// + /// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade out (same as PT0S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as PT0S).", + SerializedName = @"fadeOutDuration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? FadeOutDuration { get; set; } + /// + /// The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify + /// an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. + /// See https://aka.ms/mesformats for the complete list of supported audio and video file formats. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video file formats.", + SerializedName = @"inputLabel", + PossibleTypes = new [] { typeof(string) })] + string InputLabel { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + /// + /// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. + /// For example, PT05S to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the + /// beginning of the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the beginning of the input video.", + SerializedName = @"start", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Start { get; set; } + + } + /// Base type for all overlays - image, audio or video. + internal partial interface IOverlayInternal + + { + /// + /// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. + /// + double? AudioGainLevel { get; set; } + /// + /// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format. + /// For example, PT30S to end the overlay at 30 seconds into the input video. If not specified or the value is greater than + /// the input video duration, the overlay will be applied until the end of the input video if the overlay media duration is + /// greater than the input video duration, else the overlay will last as long as the overlay media duration. + /// + global::System.TimeSpan? End { get; set; } + /// + /// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade in (same as PT0S). + /// + global::System.TimeSpan? FadeInDuration { get; set; } + /// + /// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade out (same as PT0S). + /// + global::System.TimeSpan? FadeOutDuration { get; set; } + /// + /// The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify + /// an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. + /// See https://aka.ms/mesformats for the complete list of supported audio and video file formats. + /// + string InputLabel { get; set; } + /// The discriminator for derived types. + string OdataType { get; set; } + /// + /// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. + /// For example, PT05S to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the + /// beginning of the input video. + /// + global::System.TimeSpan? Start { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Overlay.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Overlay.json.cs new file mode 100644 index 000000000000..677728760d51 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Overlay.json.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Base type for all overlays - image, audio or video. + public partial class Overlay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.AudioOverlay": + { + return new AudioOverlay(json); + } + case "#Microsoft.Media.VideoOverlay": + { + return new VideoOverlay(json); + } + } + return new Overlay(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Overlay(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + {_inputLabel = If( json?.PropertyT("inputLabel"), out var __jsonInputLabel) ? (string)__jsonInputLabel : (string)InputLabel;} + {_start = If( json?.PropertyT("start"), out var __jsonStart) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonStart ) : Start;} + {_end = If( json?.PropertyT("end"), out var __jsonEnd) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonEnd ) : End;} + {_fadeInDuration = If( json?.PropertyT("fadeInDuration"), out var __jsonFadeInDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonFadeInDuration ) : FadeInDuration;} + {_fadeOutDuration = If( json?.PropertyT("fadeOutDuration"), out var __jsonFadeOutDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonFadeOutDuration ) : FadeOutDuration;} + {_audioGainLevel = If( json?.PropertyT("audioGainLevel"), out var __jsonAudioGainLevel) ? (double?)__jsonAudioGainLevel : AudioGainLevel;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AddIf( null != (((object)this._inputLabel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._inputLabel.ToString()) : null, "inputLabel" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._start ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._start)): null), "start" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._end ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._end)): null), "end" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._fadeInDuration ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._fadeInDuration)): null), "fadeInDuration" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._fadeOutDuration ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._fadeOutDuration)): null), "fadeOutDuration" ,container.Add ); + AddIf( null != this._audioGainLevel ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((double)this._audioGainLevel) : null, "audioGainLevel" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/PngFormat.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngFormat.cs new file mode 100644 index 000000000000..a358b895470e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngFormat.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the settings for producing PNG thumbnails. + public partial class PngFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngFormat, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngFormatInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat __format = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Format(); + + /// + /// The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} + /// - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) + /// of the input video file is less than 32 characters long, the base name of input video files will be used. If the length + /// of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total + /// length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} + /// - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + /// thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros + /// will be collapsed and removed from the filename. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string FilenamePattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).FilenamePattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).FilenamePattern = value ; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__format).OdataType = value ; } + + /// Creates an new instance. + public PngFormat() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__format), __format); + await eventListener.AssertObjectIsValid(nameof(__format), __format); + } + } + /// Describes the settings for producing PNG thumbnails. + public partial interface IPngFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat + { + + } + /// Describes the settings for producing PNG thumbnails. + internal partial interface IPngFormatInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/PngFormat.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngFormat.json.cs new file mode 100644 index 000000000000..5025a370c115 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngFormat.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the settings for producing PNG thumbnails. + public partial class PngFormat + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngFormat. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngFormat. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PngFormat(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PngFormat(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __format = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Format(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __format?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/PngImage.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngImage.cs new file mode 100644 index 000000000000..56429f253f11 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngImage.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties for producing a series of PNG images from the input video. + /// + public partial class PngImage : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngImage, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngImageInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage __image = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Image(); + + /// + /// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 + /// format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the + /// KeyFrameInterval value will follow the input source setting. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? KeyFrameInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).KeyFrameInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).KeyFrameInterval = value ?? default(global::System.TimeSpan); } + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__image).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__image).Label = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer[] _layer; + + /// A collection of output PNG image layers to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer[] Layer { get => this._layer; set => this._layer = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__image).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__image).OdataType = value ; } + + /// + /// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value + /// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30 seconds from start time), or a frame count + /// (For example, 300 to stop at the 300th frame from the frame at start time. If this value is 1, it means only producing + /// one thumbnail at start time), or a relative value to the stream duration (For example, 50% to stop at half of stream duration + /// from start time). The default value is 100%, which means to stop at the end of the stream. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Range { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Range; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Range = value ?? null; } + + /// + /// The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format (For example, + /// PT05S to start at 5 seconds), or a frame count (For example, 10 to start at the 10th frame), or a relative value to stream + /// duration (For example, 10% to start at 10% of stream duration). Also supports a macro {Best}, which tells the encoder + /// to select the best thumbnail from the first few seconds of the video and will only produce one thumbnail, no matter what + /// other settings are for Step and Range. The default value is macro {Best}. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Start { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Start; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Start = value ; } + + /// + /// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image + /// every 5 seconds), or a frame count (For example, 30 for one image every 30 frames), or a relative value to stream duration + /// (For example, 10% for one image every 10% of stream duration). Note: Step value will affect the first generated thumbnail, + /// which may not be exactly the one specified at transform preset start time. This is due to the encoder, which tries to + /// select the best thumbnail between start time and Step position from start time as the first output. As the default value + /// is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one specified at + /// start time. Try to select reasonable value for Step if the first thumbnail is expected close to start time, or set Range + /// value at 1 if only one thumbnail is needed at start time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Step; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal)__image).Step = value ?? null; } + + /// + /// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).StretchMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).StretchMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode)""); } + + /// The Video Sync Mode + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode? SyncMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).SyncMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal)__image).SyncMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode)""); } + + /// Creates an new instance. + public PngImage() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__image), __image); + await eventListener.AssertObjectIsValid(nameof(__image), __image); + } + } + /// Describes the properties for producing a series of PNG images from the input video. + public partial interface IPngImage : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage + { + /// A collection of output PNG image layers to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of output PNG image layers to be produced by the encoder.", + SerializedName = @"layers", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer[] Layer { get; set; } + + } + /// Describes the properties for producing a series of PNG images from the input video. + internal partial interface IPngImageInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageInternal + { + /// A collection of output PNG image layers to be produced by the encoder. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer[] Layer { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/PngImage.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngImage.json.cs new file mode 100644 index 000000000000..4365b35e181d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngImage.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties for producing a series of PNG images from the input video. + /// + public partial class PngImage + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngImage. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngImage. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PngImage(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PngImage(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __image = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Image(json); + {_layer = If( json?.PropertyT("layers"), out var __jsonLayers) ? If( __jsonLayers as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Layer.FromJson(__u) )) ))() : null : Layer;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __image?.ToJson(container, serializationMode); + if (null != this._layer) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._layer ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("layers",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/PngLayer.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngLayer.cs new file mode 100644 index 000000000000..63a6daf21dfe --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngLayer.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the settings to produce a PNG image from the input video. + public partial class PngLayer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngLayer, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngLayerInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer __layer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Layer(); + + /// + /// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For + /// example 50% means the output video has half as many pixels in height as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Height { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Height; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Height = value ?? null; } + + /// + /// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming + /// the output file. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Label = value ?? null; } + + /// + /// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example + /// 50% means the output video has half as many pixels in width as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Width { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Width; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Width = value ?? null; } + + /// Creates an new instance. + public PngLayer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__layer), __layer); + await eventListener.AssertObjectIsValid(nameof(__layer), __layer); + } + } + /// Describes the settings to produce a PNG image from the input video. + public partial interface IPngLayer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer + { + + } + /// Describes the settings to produce a PNG image from the input video. + internal partial interface IPngLayerInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/PngLayer.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngLayer.json.cs new file mode 100644 index 000000000000..92f5a6a8197f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/PngLayer.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the settings to produce a PNG image from the input video. + public partial class PngLayer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngLayer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngLayer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngLayer FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PngLayer(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PngLayer(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __layer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Layer(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __layer?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Preset.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Preset.cs new file mode 100644 index 000000000000..ac5761d43f08 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Preset.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base type for all Presets, which define the recipe or instructions on how the input media files should be processed. + /// + public partial class Preset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal + { + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public Preset() + { + + } + } + /// Base type for all Presets, which define the recipe or instructions on how the input media files should be processed. + public partial interface IPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base type for all Presets, which define the recipe or instructions on how the input media files should be processed. + internal partial interface IPresetInternal + + { + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Preset.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Preset.json.cs new file mode 100644 index 000000000000..8597b84d53cc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Preset.json.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base type for all Presets, which define the recipe or instructions on how the input media files should be processed. + /// + public partial class Preset + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.FaceDetectorPreset": + { + return new FaceDetectorPreset(json); + } + case "#Microsoft.Media.AudioAnalyzerPreset": + { + return new AudioAnalyzerPreset(json); + } + case "#Microsoft.Media.BuiltInStandardEncoderPreset": + { + return new BuiltInStandardEncoderPreset(json); + } + case "#Microsoft.Media.StandardEncoderPreset": + { + return new StandardEncoderPreset(json); + } + case "#Microsoft.Media.VideoAnalyzerPreset": + { + return new VideoAnalyzerPreset(json); + } + } + return new Preset(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Preset(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/PresetConfigurations.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/PresetConfigurations.cs new file mode 100644 index 000000000000..965650597fef --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/PresetConfigurations.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An object of optional configuration settings for encoder. + public partial class PresetConfigurations : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurations, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurationsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity? _complexity; + + /// + /// Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity + /// as Speed for faster encoding but less compression efficiency. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity? Complexity { get => this._complexity; set => this._complexity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput? _interleaveOutput; + + /// + /// Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set + /// InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput? InterleaveOutput { get => this._interleaveOutput; set => this._interleaveOutput = value; } + + /// Backing field for property. + private float? _keyFrameIntervalInSecond; + + /// + /// The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some + /// players. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public float? KeyFrameIntervalInSecond { get => this._keyFrameIntervalInSecond; set => this._keyFrameIntervalInSecond = value; } + + /// Backing field for property. + private int? _maxBitrateBps; + + /// + /// The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid + /// producing very high bitrate outputs for contents with high complexity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? MaxBitrateBps { get => this._maxBitrateBps; set => this._maxBitrateBps = value; } + + /// Backing field for property. + private int? _maxHeight; + + /// + /// The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the + /// input is 4K. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? MaxHeight { get => this._maxHeight; set => this._maxHeight = value; } + + /// Backing field for property. + private int? _maxLayer; + + /// + /// The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced + /// to control the overall cost of the encoding job. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? MaxLayer { get => this._maxLayer; set => this._maxLayer = value; } + + /// Backing field for property. + private int? _minBitrateBps; + + /// + /// The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to + /// have a bottom layer that covers users with low network bandwidth. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? MinBitrateBps { get => this._minBitrateBps; set => this._minBitrateBps = value; } + + /// Backing field for property. + private int? _minHeight; + + /// + /// The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions + /// like 180P. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? MinHeight { get => this._minHeight; set => this._minHeight = value; } + + /// Creates an new instance. + public PresetConfigurations() + { + + } + } + /// An object of optional configuration settings for encoder. + public partial interface IPresetConfigurations : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity + /// as Speed for faster encoding but less compression efficiency. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity as Speed for faster encoding but less compression efficiency.", + SerializedName = @"complexity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity? Complexity { get; set; } + /// + /// Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set + /// InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files.", + SerializedName = @"interleaveOutput", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput? InterleaveOutput { get; set; } + /// + /// The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some + /// players. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some players.", + SerializedName = @"keyFrameIntervalInSeconds", + PossibleTypes = new [] { typeof(float) })] + float? KeyFrameIntervalInSecond { get; set; } + /// + /// The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid + /// producing very high bitrate outputs for contents with high complexity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid producing very high bitrate outputs for contents with high complexity.", + SerializedName = @"maxBitrateBps", + PossibleTypes = new [] { typeof(int) })] + int? MaxBitrateBps { get; set; } + /// + /// The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the + /// input is 4K. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the input is 4K.", + SerializedName = @"maxHeight", + PossibleTypes = new [] { typeof(int) })] + int? MaxHeight { get; set; } + /// + /// The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced + /// to control the overall cost of the encoding job. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced to control the overall cost of the encoding job.", + SerializedName = @"maxLayers", + PossibleTypes = new [] { typeof(int) })] + int? MaxLayer { get; set; } + /// + /// The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to + /// have a bottom layer that covers users with low network bandwidth. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to have a bottom layer that covers users with low network bandwidth.", + SerializedName = @"minBitrateBps", + PossibleTypes = new [] { typeof(int) })] + int? MinBitrateBps { get; set; } + /// + /// The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions + /// like 180P. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions like 180P.", + SerializedName = @"minHeight", + PossibleTypes = new [] { typeof(int) })] + int? MinHeight { get; set; } + + } + /// An object of optional configuration settings for encoder. + internal partial interface IPresetConfigurationsInternal + + { + /// + /// Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity + /// as Speed for faster encoding but less compression efficiency. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity? Complexity { get; set; } + /// + /// Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set + /// InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput? InterleaveOutput { get; set; } + /// + /// The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some + /// players. + /// + float? KeyFrameIntervalInSecond { get; set; } + /// + /// The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid + /// producing very high bitrate outputs for contents with high complexity. + /// + int? MaxBitrateBps { get; set; } + /// + /// The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the + /// input is 4K. + /// + int? MaxHeight { get; set; } + /// + /// The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced + /// to control the overall cost of the encoding job. + /// + int? MaxLayer { get; set; } + /// + /// The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to + /// have a bottom layer that covers users with low network bandwidth. + /// + int? MinBitrateBps { get; set; } + /// + /// The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions + /// like 180P. + /// + int? MinHeight { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/PresetConfigurations.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/PresetConfigurations.json.cs new file mode 100644 index 000000000000..e34380eec580 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/PresetConfigurations.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An object of optional configuration settings for encoder. + public partial class PresetConfigurations + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurations. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurations. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetConfigurations FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PresetConfigurations(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PresetConfigurations(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_complexity = If( json?.PropertyT("complexity"), out var __jsonComplexity) ? (string)__jsonComplexity : (string)Complexity;} + {_interleaveOutput = If( json?.PropertyT("interleaveOutput"), out var __jsonInterleaveOutput) ? (string)__jsonInterleaveOutput : (string)InterleaveOutput;} + {_keyFrameIntervalInSecond = If( json?.PropertyT("keyFrameIntervalInSeconds"), out var __jsonKeyFrameIntervalInSeconds) ? (float?)__jsonKeyFrameIntervalInSeconds : KeyFrameIntervalInSecond;} + {_maxBitrateBps = If( json?.PropertyT("maxBitrateBps"), out var __jsonMaxBitrateBps) ? (int?)__jsonMaxBitrateBps : MaxBitrateBps;} + {_maxHeight = If( json?.PropertyT("maxHeight"), out var __jsonMaxHeight) ? (int?)__jsonMaxHeight : MaxHeight;} + {_maxLayer = If( json?.PropertyT("maxLayers"), out var __jsonMaxLayers) ? (int?)__jsonMaxLayers : MaxLayer;} + {_minBitrateBps = If( json?.PropertyT("minBitrateBps"), out var __jsonMinBitrateBps) ? (int?)__jsonMinBitrateBps : MinBitrateBps;} + {_minHeight = If( json?.PropertyT("minHeight"), out var __jsonMinHeight) ? (int?)__jsonMinHeight : MinHeight;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._complexity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._complexity.ToString()) : null, "complexity" ,container.Add ); + AddIf( null != (((object)this._interleaveOutput)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._interleaveOutput.ToString()) : null, "interleaveOutput" ,container.Add ); + AddIf( null != this._keyFrameIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((float)this._keyFrameIntervalInSecond) : null, "keyFrameIntervalInSeconds" ,container.Add ); + AddIf( null != this._maxBitrateBps ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._maxBitrateBps) : null, "maxBitrateBps" ,container.Add ); + AddIf( null != this._maxHeight ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._maxHeight) : null, "maxHeight" ,container.Add ); + AddIf( null != this._maxLayer ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._maxLayer) : null, "maxLayers" ,container.Add ); + AddIf( null != this._minBitrateBps ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._minBitrateBps) : null, "minBitrateBps" ,container.Add ); + AddIf( null != this._minHeight ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._minHeight) : null, "minHeight" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Properties.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Properties.cs new file mode 100644 index 000000000000..ecf22d820319 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Properties.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The service specification property. + public partial class Properties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal + { + + /// Internal Acessors for ServiceSpecification + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal.ServiceSpecification { get => (this._serviceSpecification = this._serviceSpecification ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ServiceSpecification()); set { {_serviceSpecification = value;} } } + + /// Internal Acessors for ServiceSpecificationLogSpecification + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal.ServiceSpecificationLogSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecificationInternal)ServiceSpecification).LogSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecificationInternal)ServiceSpecification).LogSpecification = value; } + + /// Internal Acessors for ServiceSpecificationMetricSpecification + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPropertiesInternal.ServiceSpecificationMetricSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecificationInternal)ServiceSpecification).MetricSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecificationInternal)ServiceSpecification).MetricSpecification = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification _serviceSpecification; + + /// The service specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification ServiceSpecification { get => (this._serviceSpecification = this._serviceSpecification ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ServiceSpecification()); } + + /// List of log specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] ServiceSpecificationLogSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecificationInternal)ServiceSpecification).LogSpecification; } + + /// List of metric specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] ServiceSpecificationMetricSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecificationInternal)ServiceSpecification).MetricSpecification; } + + /// Creates an new instance. + public Properties() + { + + } + } + /// The service specification property. + public partial interface IProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// List of log specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of log specifications.", + SerializedName = @"logSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] ServiceSpecificationLogSpecification { get; } + /// List of metric specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of metric specifications.", + SerializedName = @"metricSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] ServiceSpecificationMetricSpecification { get; } + + } + /// The service specification property. + internal partial interface IPropertiesInternal + + { + /// The service specifications. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification ServiceSpecification { get; set; } + /// List of log specifications. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] ServiceSpecificationLogSpecification { get; set; } + /// List of metric specifications. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] ServiceSpecificationMetricSpecification { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Properties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Properties.json.cs new file mode 100644 index 000000000000..c535aeb68a09 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Properties.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The service specification property. + public partial class Properties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Properties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Properties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_serviceSpecification = If( json?.PropertyT("serviceSpecification"), out var __jsonServiceSpecification) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ServiceSpecification.FromJson(__jsonServiceSpecification) : ServiceSpecification;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._serviceSpecification ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._serviceSpecification.ToJson(null,serializationMode) : null, "serviceSpecification" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Rectangle.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Rectangle.cs new file mode 100644 index 000000000000..db25ae4f73e9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Rectangle.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties of a rectangular window applied to the input media before processing it. + /// + public partial class Rectangle : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal + { + + /// Backing field for property. + private string _height; + + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Height { get => this._height; set => this._height = value; } + + /// Backing field for property. + private string _left; + + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Left { get => this._left; set => this._left = value; } + + /// Backing field for property. + private string _top; + + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Top { get => this._top; set => this._top = value; } + + /// Backing field for property. + private string _width; + + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Width { get => this._width; set => this._width = value; } + + /// Creates an new instance. + public Rectangle() + { + + } + } + /// Describes the properties of a rectangular window applied to the input media before processing it. + public partial interface IRectangle : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"height", + PossibleTypes = new [] { typeof(string) })] + string Height { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"left", + PossibleTypes = new [] { typeof(string) })] + string Left { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"top", + PossibleTypes = new [] { typeof(string) })] + string Top { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"width", + PossibleTypes = new [] { typeof(string) })] + string Width { get; set; } + + } + /// Describes the properties of a rectangular window applied to the input media before processing it. + internal partial interface IRectangleInternal + + { + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string Height { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + string Left { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + string Top { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string Width { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Rectangle.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Rectangle.json.cs new file mode 100644 index 000000000000..28c55f56d6af --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Rectangle.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties of a rectangular window applied to the input media before processing it. + /// + public partial class Rectangle + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Rectangle(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Rectangle(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_left = If( json?.PropertyT("left"), out var __jsonLeft) ? (string)__jsonLeft : (string)Left;} + {_top = If( json?.PropertyT("top"), out var __jsonTop) ? (string)__jsonTop : (string)Top;} + {_width = If( json?.PropertyT("width"), out var __jsonWidth) ? (string)__jsonWidth : (string)Width;} + {_height = If( json?.PropertyT("height"), out var __jsonHeight) ? (string)__jsonHeight : (string)Height;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._left)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._left.ToString()) : null, "left" ,container.Add ); + AddIf( null != (((object)this._top)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._top.ToString()) : null, "top" ,container.Add ); + AddIf( null != (((object)this._width)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._width.ToString()) : null, "width" ,container.Add ); + AddIf( null != (((object)this._height)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._height.ToString()) : null, "height" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ResourceIdentity.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ResourceIdentity.cs new file mode 100644 index 000000000000..5573505f3178 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ResourceIdentity.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class ResourceIdentity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentityInternal + { + + /// Backing field for property. + private bool _useSystemAssignedIdentity; + + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool UseSystemAssignedIdentity { get => this._useSystemAssignedIdentity; set => this._useSystemAssignedIdentity = value; } + + /// Backing field for property. + private string _userAssignedIdentity; + + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string UserAssignedIdentity { get => this._userAssignedIdentity; set => this._userAssignedIdentity = value; } + + /// Creates an new instance. + public ResourceIdentity() + { + + } + } + public partial interface IResourceIdentity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity.", + SerializedName = @"useSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool UseSystemAssignedIdentity { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user assigned managed identity's ARM ID to use when accessing a resource.", + SerializedName = @"userAssignedIdentity", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentity { get; set; } + + } + internal partial interface IResourceIdentityInternal + + { + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + bool UseSystemAssignedIdentity { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + string UserAssignedIdentity { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ResourceIdentity.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ResourceIdentity.json.cs new file mode 100644 index 000000000000..62234ed638d1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ResourceIdentity.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class ResourceIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ResourceIdentity(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceIdentity(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentity"), out var __jsonUserAssignedIdentity) ? (string)__jsonUserAssignedIdentity : (string)UserAssignedIdentity;} + {_useSystemAssignedIdentity = If( json?.PropertyT("useSystemAssignedIdentity"), out var __jsonUseSystemAssignedIdentity) ? (bool)__jsonUseSystemAssignedIdentity : UseSystemAssignedIdentity;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._userAssignedIdentity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._userAssignedIdentity.ToString()) : null, "userAssignedIdentity" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._useSystemAssignedIdentity), "useSystemAssignedIdentity" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackByAttribute.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackByAttribute.cs new file mode 100644 index 000000000000..7edf5c36ec68 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackByAttribute.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Select audio tracks from the input by specifying an attribute and an attribute filter. + /// + public partial class SelectAudioTrackByAttribute : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackByAttribute, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackByAttributeInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor __audioTrackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AudioTrackDescriptor(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute _attribute; + + /// The TrackAttribute to filter the tracks by. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute Attribute { get => this._attribute; set => this._attribute = value; } + + /// + /// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio + /// tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping? ChannelMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptorInternal)__audioTrackDescriptor).ChannelMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptorInternal)__audioTrackDescriptor).ChannelMapping = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter _filter; + + /// + /// The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter Filter { get => this._filter; set => this._filter = value; } + + /// Backing field for property. + private string _filterValue; + + /// + /// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FilterValue { get => this._filterValue; set => this._filterValue = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__audioTrackDescriptor).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__audioTrackDescriptor).OdataType = value ; } + + /// Creates an new instance. + public SelectAudioTrackByAttribute() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__audioTrackDescriptor), __audioTrackDescriptor); + await eventListener.AssertObjectIsValid(nameof(__audioTrackDescriptor), __audioTrackDescriptor); + } + } + /// Select audio tracks from the input by specifying an attribute and an attribute filter. + public partial interface ISelectAudioTrackByAttribute : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor + { + /// The TrackAttribute to filter the tracks by. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The TrackAttribute to filter the tracks by.", + SerializedName = @"attribute", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute Attribute { get; set; } + /// + /// The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.", + SerializedName = @"filter", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter Filter { get; set; } + /// + /// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property.", + SerializedName = @"filterValue", + PossibleTypes = new [] { typeof(string) })] + string FilterValue { get; set; } + + } + /// Select audio tracks from the input by specifying an attribute and an attribute filter. + internal partial interface ISelectAudioTrackByAttributeInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptorInternal + { + /// The TrackAttribute to filter the tracks by. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute Attribute { get; set; } + /// + /// The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter Filter { get; set; } + /// + /// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. + /// + string FilterValue { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackByAttribute.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackByAttribute.json.cs new file mode 100644 index 000000000000..347807e70487 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackByAttribute.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Select audio tracks from the input by specifying an attribute and an attribute filter. + /// + public partial class SelectAudioTrackByAttribute + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackByAttribute. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackByAttribute. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackByAttribute FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new SelectAudioTrackByAttribute(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal SelectAudioTrackByAttribute(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __audioTrackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AudioTrackDescriptor(json); + {_attribute = If( json?.PropertyT("attribute"), out var __jsonAttribute) ? (string)__jsonAttribute : (string)Attribute;} + {_filter = If( json?.PropertyT("filter"), out var __jsonFilter) ? (string)__jsonFilter : (string)Filter;} + {_filterValue = If( json?.PropertyT("filterValue"), out var __jsonFilterValue) ? (string)__jsonFilterValue : (string)FilterValue;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __audioTrackDescriptor?.ToJson(container, serializationMode); + AddIf( null != (((object)this._attribute)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._attribute.ToString()) : null, "attribute" ,container.Add ); + AddIf( null != (((object)this._filter)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._filter.ToString()) : null, "filter" ,container.Add ); + AddIf( null != (((object)this._filterValue)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._filterValue.ToString()) : null, "filterValue" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackById.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackById.cs new file mode 100644 index 000000000000..c0ad8dbe7119 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackById.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Select audio tracks from the input by specifying a track identifier. + public partial class SelectAudioTrackById : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackById, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackByIdInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor __audioTrackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AudioTrackDescriptor(); + + /// + /// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio + /// tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping? ChannelMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptorInternal)__audioTrackDescriptor).ChannelMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptorInternal)__audioTrackDescriptor).ChannelMapping = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping)""); } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__audioTrackDescriptor).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__audioTrackDescriptor).OdataType = value ; } + + /// Backing field for property. + private long _trackId; + + /// Track identifier to select + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long TrackId { get => this._trackId; set => this._trackId = value; } + + /// Creates an new instance. + public SelectAudioTrackById() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__audioTrackDescriptor), __audioTrackDescriptor); + await eventListener.AssertObjectIsValid(nameof(__audioTrackDescriptor), __audioTrackDescriptor); + } + } + /// Select audio tracks from the input by specifying a track identifier. + public partial interface ISelectAudioTrackById : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptor + { + /// Track identifier to select + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Track identifier to select", + SerializedName = @"trackId", + PossibleTypes = new [] { typeof(long) })] + long TrackId { get; set; } + + } + /// Select audio tracks from the input by specifying a track identifier. + internal partial interface ISelectAudioTrackByIdInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioTrackDescriptorInternal + { + /// Track identifier to select + long TrackId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackById.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackById.json.cs new file mode 100644 index 000000000000..21a6b69ad2b5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectAudioTrackById.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Select audio tracks from the input by specifying a track identifier. + public partial class SelectAudioTrackById + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackById. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackById. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectAudioTrackById FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new SelectAudioTrackById(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal SelectAudioTrackById(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __audioTrackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AudioTrackDescriptor(json); + {_trackId = If( json?.PropertyT("trackId"), out var __jsonTrackId) ? (long)__jsonTrackId : TrackId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __audioTrackDescriptor?.ToJson(container, serializationMode); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._trackId), "trackId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackByAttribute.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackByAttribute.cs new file mode 100644 index 000000000000..c4d3446a80cc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackByAttribute.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Select video tracks from the input by specifying an attribute and an attribute filter. + /// + public partial class SelectVideoTrackByAttribute : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackByAttribute, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackByAttributeInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor __trackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TrackDescriptor(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute _attribute; + + /// The TrackAttribute to filter the tracks by. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute Attribute { get => this._attribute; set => this._attribute = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter _filter; + + /// + /// The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter Filter { get => this._filter; set => this._filter = value; } + + /// Backing field for property. + private string _filterValue; + + /// + /// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. For + /// TrackAttribute.Bitrate, this should be an integer value in bits per second (e.g: '1500000'). The TrackAttribute.Language + /// is not supported for video tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FilterValue { get => this._filterValue; set => this._filterValue = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__trackDescriptor).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__trackDescriptor).OdataType = value ; } + + /// Creates an new instance. + public SelectVideoTrackByAttribute() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackDescriptor), __trackDescriptor); + await eventListener.AssertObjectIsValid(nameof(__trackDescriptor), __trackDescriptor); + } + } + /// Select video tracks from the input by specifying an attribute and an attribute filter. + public partial interface ISelectVideoTrackByAttribute : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor + { + /// The TrackAttribute to filter the tracks by. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The TrackAttribute to filter the tracks by.", + SerializedName = @"attribute", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute Attribute { get; set; } + /// + /// The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.", + SerializedName = @"filter", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter Filter { get; set; } + /// + /// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. For + /// TrackAttribute.Bitrate, this should be an integer value in bits per second (e.g: '1500000'). The TrackAttribute.Language + /// is not supported for video tracks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. For TrackAttribute.Bitrate, this should be an integer value in bits per second (e.g: '1500000'). The TrackAttribute.Language is not supported for video tracks.", + SerializedName = @"filterValue", + PossibleTypes = new [] { typeof(string) })] + string FilterValue { get; set; } + + } + /// Select video tracks from the input by specifying an attribute and an attribute filter. + internal partial interface ISelectVideoTrackByAttributeInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal + { + /// The TrackAttribute to filter the tracks by. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute Attribute { get; set; } + /// + /// The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter Filter { get; set; } + /// + /// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. For + /// TrackAttribute.Bitrate, this should be an integer value in bits per second (e.g: '1500000'). The TrackAttribute.Language + /// is not supported for video tracks. + /// + string FilterValue { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackByAttribute.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackByAttribute.json.cs new file mode 100644 index 000000000000..b69f7967cd88 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackByAttribute.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Select video tracks from the input by specifying an attribute and an attribute filter. + /// + public partial class SelectVideoTrackByAttribute + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackByAttribute. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackByAttribute. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackByAttribute FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new SelectVideoTrackByAttribute(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal SelectVideoTrackByAttribute(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TrackDescriptor(json); + {_attribute = If( json?.PropertyT("attribute"), out var __jsonAttribute) ? (string)__jsonAttribute : (string)Attribute;} + {_filter = If( json?.PropertyT("filter"), out var __jsonFilter) ? (string)__jsonFilter : (string)Filter;} + {_filterValue = If( json?.PropertyT("filterValue"), out var __jsonFilterValue) ? (string)__jsonFilterValue : (string)FilterValue;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackDescriptor?.ToJson(container, serializationMode); + AddIf( null != (((object)this._attribute)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._attribute.ToString()) : null, "attribute" ,container.Add ); + AddIf( null != (((object)this._filter)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._filter.ToString()) : null, "filter" ,container.Add ); + AddIf( null != (((object)this._filterValue)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._filterValue.ToString()) : null, "filterValue" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackById.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackById.cs new file mode 100644 index 000000000000..7ecd4ad0e52c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackById.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Select video tracks from the input by specifying a track identifier. + public partial class SelectVideoTrackById : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackById, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackByIdInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor __trackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TrackDescriptor(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__trackDescriptor).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__trackDescriptor).OdataType = value ; } + + /// Backing field for property. + private long _trackId; + + /// Track identifier to select + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long TrackId { get => this._trackId; set => this._trackId = value; } + + /// Creates an new instance. + public SelectVideoTrackById() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackDescriptor), __trackDescriptor); + await eventListener.AssertObjectIsValid(nameof(__trackDescriptor), __trackDescriptor); + } + } + /// Select video tracks from the input by specifying a track identifier. + public partial interface ISelectVideoTrackById : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor + { + /// Track identifier to select + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Track identifier to select", + SerializedName = @"trackId", + PossibleTypes = new [] { typeof(long) })] + long TrackId { get; set; } + + } + /// Select video tracks from the input by specifying a track identifier. + internal partial interface ISelectVideoTrackByIdInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal + { + /// Track identifier to select + long TrackId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackById.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackById.json.cs new file mode 100644 index 000000000000..6d5fbaee9dd6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SelectVideoTrackById.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Select video tracks from the input by specifying a track identifier. + public partial class SelectVideoTrackById + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackById. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackById. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISelectVideoTrackById FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new SelectVideoTrackById(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal SelectVideoTrackById(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TrackDescriptor(json); + {_trackId = If( json?.PropertyT("trackId"), out var __jsonTrackId) ? (long)__jsonTrackId : TrackId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackDescriptor?.ToJson(container, serializationMode); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._trackId), "trackId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ServiceSpecification.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ServiceSpecification.cs new file mode 100644 index 000000000000..aec4c67b4668 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ServiceSpecification.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The service metric specifications. + public partial class ServiceSpecification : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecificationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] _logSpecification; + + /// List of log specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] LogSpecification { get => this._logSpecification; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] _metricSpecification; + + /// List of metric specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] MetricSpecification { get => this._metricSpecification; } + + /// Internal Acessors for LogSpecification + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecificationInternal.LogSpecification { get => this._logSpecification; set { {_logSpecification = value;} } } + + /// Internal Acessors for MetricSpecification + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecificationInternal.MetricSpecification { get => this._metricSpecification; set { {_metricSpecification = value;} } } + + /// Creates an new instance. + public ServiceSpecification() + { + + } + } + /// The service metric specifications. + public partial interface IServiceSpecification : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// List of log specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of log specifications.", + SerializedName = @"logSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] LogSpecification { get; } + /// List of metric specifications. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of metric specifications.", + SerializedName = @"metricSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] MetricSpecification { get; } + + } + /// The service metric specifications. + internal partial interface IServiceSpecificationInternal + + { + /// List of log specifications. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification[] LogSpecification { get; set; } + /// List of metric specifications. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification[] MetricSpecification { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/ServiceSpecification.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/ServiceSpecification.json.cs new file mode 100644 index 000000000000..1c290e42afa4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/ServiceSpecification.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The service metric specifications. + public partial class ServiceSpecification + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IServiceSpecification FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ServiceSpecification(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ServiceSpecification(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_logSpecification = If( json?.PropertyT("logSpecifications"), out var __jsonLogSpecifications) ? If( __jsonLogSpecifications as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILogSpecification) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.LogSpecification.FromJson(__u) )) ))() : null : LogSpecification;} + {_metricSpecification = If( json?.PropertyT("metricSpecifications"), out var __jsonMetricSpecifications) ? If( __jsonMetricSpecifications as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMetricSpecification) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MetricSpecification.FromJson(__p) )) ))() : null : MetricSpecification;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._logSpecification) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._logSpecification ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("logSpecifications",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._metricSpecification) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._metricSpecification ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("metricSpecifications",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/StandardEncoderPreset.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/StandardEncoderPreset.cs new file mode 100644 index 000000000000..bbb2ad537f66 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/StandardEncoderPreset.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes all the settings to be used when encoding the input video with the Standard Encoder. + /// + public partial class StandardEncoderPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStandardEncoderPreset, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStandardEncoderPresetInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset __preset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec[] _codec; + + /// The list of codecs to be used when encoding the input video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec[] Codec { get => this._codec; set => this._codec = value; } + + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropHeight { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).CropHeight; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).CropHeight = value ?? null; } + + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropLeft { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).CropLeft; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).CropLeft = value ?? null; } + + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropTop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).CropTop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).CropTop = value ?? null; } + + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropWidth { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).CropWidth; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).CropWidth = value ?? null; } + + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? DeinterlaceMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).DeinterlaceMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).DeinterlaceMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode)""); } + + /// The field parity for de-interlacing, defaults to Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? DeinterlaceParity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).DeinterlaceParity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).DeinterlaceParity = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFilters _filter; + + /// + /// One or more filtering operations that are applied to the input media before encoding. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFilters Filter { get => (this._filter = this._filter ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Filters()); set => this._filter = value; } + + /// + /// The properties of overlays to be applied to the input video. These could be audio, image or video overlays. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay[] FilterOverlay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).Overlay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).Overlay = value ?? null /* arrayOf */; } + + /// + /// The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation? FilterRotation { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).Rotation; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).Rotation = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat[] _format; + + /// The list of outputs to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat[] Format { get => this._format; set => this._format = value; } + + /// Internal Acessors for Filter + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFilters Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStandardEncoderPresetInternal.Filter { get => (this._filter = this._filter ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Filters()); set { {_filter = value;} } } + + /// Internal Acessors for FilterCrop + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStandardEncoderPresetInternal.FilterCrop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).Crop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).Crop = value; } + + /// Internal Acessors for FilterDeinterlace + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStandardEncoderPresetInternal.FilterDeinterlace { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).Deinterlace; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFiltersInternal)Filter).Deinterlace = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__preset).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__preset).OdataType = value ; } + + /// Creates an new instance. + public StandardEncoderPreset() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__preset), __preset); + await eventListener.AssertObjectIsValid(nameof(__preset), __preset); + } + } + /// Describes all the settings to be used when encoding the input video with the Standard Encoder. + public partial interface IStandardEncoderPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset + { + /// The list of codecs to be used when encoding the input video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The list of codecs to be used when encoding the input video.", + SerializedName = @"codecs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudio),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAacAudio),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH265Video),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyVideo),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImage),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICopyAudio),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IH264Video),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgImage),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngImage) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec[] Codec { get; set; } + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"height", + PossibleTypes = new [] { typeof(string) })] + string CropHeight { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"left", + PossibleTypes = new [] { typeof(string) })] + string CropLeft { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"top", + PossibleTypes = new [] { typeof(string) })] + string CropTop { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"width", + PossibleTypes = new [] { typeof(string) })] + string CropWidth { get; set; } + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The deinterlacing mode. Defaults to AutoPixelAdaptive.", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? DeinterlaceMode { get; set; } + /// The field parity for de-interlacing, defaults to Auto. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The field parity for de-interlacing, defaults to Auto.", + SerializedName = @"parity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? DeinterlaceParity { get; set; } + /// + /// The properties of overlays to be applied to the input video. These could be audio, image or video overlays. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The properties of overlays to be applied to the input video. These could be audio, image or video overlays.", + SerializedName = @"overlays", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioOverlay) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay[] FilterOverlay { get; set; } + /// + /// The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto", + SerializedName = @"rotation", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation? FilterRotation { get; set; } + /// The list of outputs to be produced by the encoder. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The list of outputs to be produced by the encoder.", + SerializedName = @"formats", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IImageFormat),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IJpgFormat),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPngFormat),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMp4Format) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat[] Format { get; set; } + + } + /// Describes all the settings to be used when encoding the input video with the Standard Encoder. + internal partial interface IStandardEncoderPresetInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal + { + /// The list of codecs to be used when encoding the input video. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec[] Codec { get; set; } + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string CropHeight { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + string CropLeft { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + string CropTop { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string CropWidth { get; set; } + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode? DeinterlaceMode { get; set; } + /// The field parity for de-interlacing, defaults to Auto. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity? DeinterlaceParity { get; set; } + /// + /// One or more filtering operations that are applied to the input media before encoding. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFilters Filter { get; set; } + /// The parameters for the rectangular window with which to crop the input video. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle FilterCrop { get; set; } + /// The de-interlacing settings. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IDeinterlace FilterDeinterlace { get; set; } + /// + /// The properties of overlays to be applied to the input video. These could be audio, image or video overlays. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay[] FilterOverlay { get; set; } + /// + /// The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation? FilterRotation { get; set; } + /// The list of outputs to be produced by the encoder. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat[] Format { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/StandardEncoderPreset.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/StandardEncoderPreset.json.cs new file mode 100644 index 000000000000..f600d2dcd634 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/StandardEncoderPreset.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes all the settings to be used when encoding the input video with the Standard Encoder. + /// + public partial class StandardEncoderPreset + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStandardEncoderPreset. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStandardEncoderPreset. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStandardEncoderPreset FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StandardEncoderPreset(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StandardEncoderPreset(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __preset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset(json); + {_filter = If( json?.PropertyT("filters"), out var __jsonFilters) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Filters.FromJson(__jsonFilters) : Filter;} + {_codec = If( json?.PropertyT("codecs"), out var __jsonCodecs) ? If( __jsonCodecs as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Codec.FromJson(__u) )) ))() : null : Codec;} + {_format = If( json?.PropertyT("formats"), out var __jsonFormats) ? If( __jsonFormats as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormat) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Format.FromJson(__p) )) ))() : null : Format;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __preset?.ToJson(container, serializationMode); + AddIf( null != this._filter ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._filter.ToJson(null,serializationMode) : null, "filters" ,container.Add ); + if (null != this._codec) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._codec ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("codecs",__w); + } + if (null != this._format) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._format ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("formats",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/StorageAccount.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/StorageAccount.cs new file mode 100644 index 000000000000..543909bc9e43 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/StorageAccount.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The storage account details. + public partial class StorageAccount : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccountInternal + { + + /// Backing field for property. + private string _id; + + /// + /// The ID of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage + /// account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts + /// can be added as secondary storage accounts. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity _identity; + + /// The storage account identity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ResourceIdentity()); set => this._identity = value; } + + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? IdentityUseSystemAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentityInternal)Identity).UseSystemAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentityInternal)Identity).UseSystemAssignedIdentity = value ?? default(bool); } + + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentityInternal)Identity).UserAssignedIdentity = value ?? null; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccountInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ResourceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccountInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private string _status; + + /// The current status of the storage account mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Status { get => this._status; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType _type; + + /// The type of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public StorageAccount() + { + + } + } + /// The storage account details. + public partial interface IStorageAccount : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The ID of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage + /// account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts + /// can be added as secondary storage accounts. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts can be added as secondary storage accounts.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity.", + SerializedName = @"useSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user assigned managed identity's ARM ID to use when accessing a resource.", + SerializedName = @"userAssignedIdentity", + PossibleTypes = new [] { typeof(string) })] + string IdentityUserAssignedIdentity { get; set; } + /// The current status of the storage account mapping. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current status of the storage account mapping.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; } + /// The type of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of the storage account.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType Type { get; set; } + + } + /// The storage account details. + internal partial interface IStorageAccountInternal + + { + /// + /// The ID of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage + /// account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts + /// can be added as secondary storage accounts. + /// + string Id { get; set; } + /// The storage account identity. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IResourceIdentity Identity { get; set; } + /// + /// Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity. + /// + bool? IdentityUseSystemAssignedIdentity { get; set; } + /// The user assigned managed identity's ARM ID to use when accessing a resource. + string IdentityUserAssignedIdentity { get; set; } + /// The current status of the storage account mapping. + string Status { get; set; } + /// The type of the storage account. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/StorageAccount.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/StorageAccount.json.cs new file mode 100644 index 000000000000..d4278d302e3c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/StorageAccount.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The storage account details. + public partial class StorageAccount + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IStorageAccount FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StorageAccount(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StorageAccount(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ResourceIdentity.FromJson(__jsonIdentity) : Identity;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SyncStorageKeysInput.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SyncStorageKeysInput.cs new file mode 100644 index 000000000000..dc518b0baaef --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SyncStorageKeysInput.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The input to the sync storage keys request. + public partial class SyncStorageKeysInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISyncStorageKeysInput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISyncStorageKeysInputInternal + { + + /// Backing field for property. + private string _id; + + /// The ID of the storage account resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Creates an new instance. + public SyncStorageKeysInput() + { + + } + } + /// The input to the sync storage keys request. + public partial interface ISyncStorageKeysInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The ID of the storage account resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID of the storage account resource.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + } + /// The input to the sync storage keys request. + internal partial interface ISyncStorageKeysInputInternal + + { + /// The ID of the storage account resource. + string Id { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/SyncStorageKeysInput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/SyncStorageKeysInput.json.cs new file mode 100644 index 000000000000..a612256ca093 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/SyncStorageKeysInput.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The input to the sync storage keys request. + public partial class SyncStorageKeysInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISyncStorageKeysInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISyncStorageKeysInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ISyncStorageKeysInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new SyncStorageKeysInput(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal SyncStorageKeysInput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TrackDescriptor.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TrackDescriptor.cs new file mode 100644 index 000000000000..31ed32c456a0 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TrackDescriptor.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base type for all TrackDescriptor types, which define the metadata and selection for tracks that should be processed by + /// a Job + /// + public partial class TrackDescriptor : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal + { + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public TrackDescriptor() + { + + } + } + /// Base type for all TrackDescriptor types, which define the metadata and selection for tracks that should be processed by + /// a Job + public partial interface ITrackDescriptor : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base type for all TrackDescriptor types, which define the metadata and selection for tracks that should be processed by + /// a Job + internal partial interface ITrackDescriptorInternal + + { + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TrackDescriptor.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TrackDescriptor.json.cs new file mode 100644 index 000000000000..05393a468552 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TrackDescriptor.json.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base type for all TrackDescriptor types, which define the metadata and selection for tracks that should be processed by + /// a Job + /// + public partial class TrackDescriptor + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.AudioTrackDescriptor": + { + return new AudioTrackDescriptor(json); + } + case "#Microsoft.Media.SelectAudioTrackByAttribute": + { + return new SelectAudioTrackByAttribute(json); + } + case "#Microsoft.Media.SelectAudioTrackById": + { + return new SelectAudioTrackById(json); + } + case "#Microsoft.Media.VideoTrackDescriptor": + { + return new VideoTrackDescriptor(json); + } + case "#Microsoft.Media.SelectVideoTrackByAttribute": + { + return new SelectVideoTrackByAttribute(json); + } + case "#Microsoft.Media.SelectVideoTrackById": + { + return new SelectVideoTrackById(json); + } + } + return new TrackDescriptor(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TrackDescriptor(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Transform.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Transform.cs new file mode 100644 index 000000000000..e0cfb44f6027 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Transform.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding + /// or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs. + /// + public partial class Transform : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// + /// The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).Created; } + + /// An optional verbose description of the Transform. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).Description = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// + /// The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).LastModified; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformInternal.Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).Created; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).Created = value; } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformInternal.LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).LastModified; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).LastModified = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TransformProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// An array of one or more TransformOutputs that the Transform should generate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput[] Output { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).Output; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal)Property).Output = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformProperties _property; + + /// The resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TransformProperties()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public Transform() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding + /// or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs. + public partial interface ITransform : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// + /// The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// An optional verbose description of the Transform. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An optional verbose description of the Transform.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// An array of one or more TransformOutputs that the Transform should generate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of one or more TransformOutputs that the Transform should generate.", + SerializedName = @"outputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput[] Output { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding + /// or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs. + internal partial interface ITransformInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// + /// The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + global::System.DateTime? Created { get; set; } + /// An optional verbose description of the Transform. + string Description { get; set; } + /// + /// The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + global::System.DateTime? LastModified { get; set; } + /// An array of one or more TransformOutputs that the Transform should generate. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput[] Output { get; set; } + /// The resource properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformProperties Property { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Transform.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Transform.json.cs new file mode 100644 index 000000000000..0b59375ac836 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Transform.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding + /// or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs. + /// + public partial class Transform + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Transform(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Transform(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TransformProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformCollection.cs new file mode 100644 index 000000000000..45a074cae5ba --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of Transform items. + public partial class TransformCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformCollectionInternal + { + + /// Backing field for property. + private string _odataNextLink; + + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform[] _value; + + /// A collection of Transform items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public TransformCollection() + { + + } + } + /// A collection of Transform items. + public partial interface ITransformCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A link to the next page of the collection (when the collection contains too many results to return in one response).", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// A collection of Transform items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of Transform items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform[] Value { get; set; } + + } + /// A collection of Transform items. + internal partial interface ITransformCollectionInternal + + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + string OdataNextLink { get; set; } + /// A collection of Transform items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformCollection.json.cs new file mode 100644 index 000000000000..6ceb39cf92c4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformCollection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of Transform items. + public partial class TransformCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TransformCollection(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TransformCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransform) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Transform.FromJson(__u) )) ))() : null : Value;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformOutput.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformOutput.cs new file mode 100644 index 000000000000..d39f4951e940 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformOutput.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties of a TransformOutput, which are the rules to be applied while generating the desired output. + /// + public partial class TransformOutput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutputInternal + { + + /// Internal Acessors for Preset + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutputInternal.Preset { get => (this._preset = this._preset ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset()); set { {_preset = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType? _onError; + + /// + /// A Transform can define more than one outputs. This property defines what the service should do when one output fails - + /// either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures + /// of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType? OnError { get => this._onError; set => this._onError = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset _preset; + + /// + /// Preset that describes the operations that will be used to modify, transcode, or extract insights from the source file + /// to generate the output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset Preset { get => (this._preset = this._preset ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset()); set => this._preset = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PresetOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)Preset).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)Preset).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? _relativePriority; + + /// + /// Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for + /// processing TransformOutputs. The default priority is Normal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? RelativePriority { get => this._relativePriority; set => this._relativePriority = value; } + + /// Creates an new instance. + public TransformOutput() + { + + } + } + /// Describes the properties of a TransformOutput, which are the rules to be applied while generating the desired output. + public partial interface ITransformOutput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A Transform can define more than one outputs. This property defines what the service should do when one output fails - + /// either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures + /// of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'.", + SerializedName = @"onError", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType? OnError { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string PresetOdataType { get; set; } + /// + /// Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for + /// processing TransformOutputs. The default priority is Normal. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for processing TransformOutputs. The default priority is Normal.", + SerializedName = @"relativePriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? RelativePriority { get; set; } + + } + /// Describes the properties of a TransformOutput, which are the rules to be applied while generating the desired output. + internal partial interface ITransformOutputInternal + + { + /// + /// A Transform can define more than one outputs. This property defines what the service should do when one output fails - + /// either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures + /// of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType? OnError { get; set; } + /// + /// Preset that describes the operations that will be used to modify, transcode, or extract insights from the source file + /// to generate the output. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPreset Preset { get; set; } + /// The discriminator for derived types. + string PresetOdataType { get; set; } + /// + /// Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for + /// processing TransformOutputs. The default priority is Normal. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority? RelativePriority { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformOutput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformOutput.json.cs new file mode 100644 index 000000000000..3ddc2c374e68 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformOutput.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties of a TransformOutput, which are the rules to be applied while generating the desired output. + /// + public partial class TransformOutput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TransformOutput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._preset ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._preset.ToJson(null,serializationMode) : null, "preset" ,container.Add ); + AddIf( null != (((object)this._onError)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._onError.ToString()) : null, "onError" ,container.Add ); + AddIf( null != (((object)this._relativePriority)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._relativePriority.ToString()) : null, "relativePriority" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TransformOutput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_preset = If( json?.PropertyT("preset"), out var __jsonPreset) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Preset.FromJson(__jsonPreset) : Preset;} + {_onError = If( json?.PropertyT("onError"), out var __jsonOnError) ? (string)__jsonOnError : (string)OnError;} + {_relativePriority = If( json?.PropertyT("relativePriority"), out var __jsonRelativePriority) ? (string)__jsonRelativePriority : (string)RelativePriority;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformProperties.cs new file mode 100644 index 000000000000..aa40c8b2cafb --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformProperties.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Transform. + public partial class TransformProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal + { + + /// Backing field for property. + private global::System.DateTime? _created; + + /// + /// The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private string _description; + + /// An optional verbose description of the Transform. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModified; + + /// + /// The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? LastModified { get => this._lastModified; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal.Created { get => this._created; set { {_created = value;} } } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformPropertiesInternal.LastModified { get => this._lastModified; set { {_lastModified = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput[] _output; + + /// An array of one or more TransformOutputs that the Transform should generate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput[] Output { get => this._output; set => this._output = value; } + + /// Creates an new instance. + public TransformProperties() + { + + } + } + /// A Transform. + public partial interface ITransformProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// An optional verbose description of the Transform. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An optional verbose description of the Transform.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// An array of one or more TransformOutputs that the Transform should generate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"An array of one or more TransformOutputs that the Transform should generate.", + SerializedName = @"outputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput[] Output { get; set; } + + } + /// A Transform. + internal partial interface ITransformPropertiesInternal + + { + /// + /// The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + global::System.DateTime? Created { get; set; } + /// An optional verbose description of the Transform. + string Description { get; set; } + /// + /// The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + /// + global::System.DateTime? LastModified { get; set; } + /// An array of one or more TransformOutputs that the Transform should generate. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput[] Output { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformProperties.json.cs new file mode 100644 index 000000000000..c2f92a052441 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransformProperties.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Transform. + public partial class TransformProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TransformProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._lastModified ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModified?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModified" ,container.Add ); + } + if (null != this._output) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._output ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("outputs",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TransformProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_lastModified = If( json?.PropertyT("lastModified"), out var __jsonLastModified) ? global::System.DateTime.TryParse((string)__jsonLastModified, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedValue) ? __jsonLastModifiedValue : LastModified : LastModified;} + {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? If( __jsonOutputs as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransformOutput) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TransformOutput.FromJson(__u) )) ))() : null : Output;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TransportStreamFormat.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransportStreamFormat.cs new file mode 100644 index 000000000000..d1449be2d479 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransportStreamFormat.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s). + /// + public partial class TransportStreamFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransportStreamFormat, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransportStreamFormatInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat __multiBitrateFormat = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MultiBitrateFormat(); + + /// + /// The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} + /// - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) + /// of the input video file is less than 32 characters long, the base name of input video files will be used. If the length + /// of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total + /// length. {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} + /// - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + /// thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros + /// will be collapsed and removed from the filename. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string FilenamePattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__multiBitrateFormat).FilenamePattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__multiBitrateFormat).FilenamePattern = value ; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__multiBitrateFormat).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IFormatInternal)__multiBitrateFormat).OdataType = value ; } + + /// + /// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together + /// . + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOutputFile[] OutputFile { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormatInternal)__multiBitrateFormat).OutputFile; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormatInternal)__multiBitrateFormat).OutputFile = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public TransportStreamFormat() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__multiBitrateFormat), __multiBitrateFormat); + await eventListener.AssertObjectIsValid(nameof(__multiBitrateFormat), __multiBitrateFormat); + } + } + /// Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s). + public partial interface ITransportStreamFormat : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormat + { + + } + /// Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s). + internal partial interface ITransportStreamFormatInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IMultiBitrateFormatInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/TransportStreamFormat.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransportStreamFormat.json.cs new file mode 100644 index 000000000000..d56911ceaf93 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/TransportStreamFormat.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s). + /// + public partial class TransportStreamFormat + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransportStreamFormat. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransportStreamFormat. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITransportStreamFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TransportStreamFormat(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __multiBitrateFormat?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TransportStreamFormat(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __multiBitrateFormat = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.MultiBitrateFormat(json); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.cs new file mode 100644 index 000000000000..22a19023c438 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The User Assigned Managed Identities. + public partial class UserAssignedManagedIdentities : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentitiesInternal + { + + /// Creates an new instance. + public UserAssignedManagedIdentities() + { + + } + } + /// The User Assigned Managed Identities. + public partial interface IUserAssignedManagedIdentities : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + + } + /// The User Assigned Managed Identities. + internal partial interface IUserAssignedManagedIdentitiesInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.dictionary.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.dictionary.cs new file mode 100644 index 000000000000..487b2be8d47b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class UserAssignedManagedIdentities : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentity this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentity value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentity value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.UserAssignedManagedIdentities source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.json.cs new file mode 100644 index 000000000000..8ba964408d53 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentities.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The User Assigned Managed Identities. + public partial class UserAssignedManagedIdentities + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new UserAssignedManagedIdentities(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + /// + internal UserAssignedManagedIdentities(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.UserAssignedManagedIdentity.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentity.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentity.cs new file mode 100644 index 000000000000..0f3a3813174f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentity.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class UserAssignedManagedIdentity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentityInternal + { + + /// Backing field for property. + private string _clientId; + + /// The client ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ClientId { get => this._clientId; } + + /// Internal Acessors for ClientId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentityInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } + + /// Internal Acessors for PrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + + /// Backing field for property. + private string _principalId; + + /// The principal ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PrincipalId { get => this._principalId; } + + /// Creates an new instance. + public UserAssignedManagedIdentity() + { + + } + } + public partial interface IUserAssignedManagedIdentity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The client ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The client ID.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string ClientId { get; } + /// The principal ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The principal ID.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string PrincipalId { get; } + + } + internal partial interface IUserAssignedManagedIdentityInternal + + { + /// The client ID. + string ClientId { get; set; } + /// The principal ID. + string PrincipalId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentity.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentity.json.cs new file mode 100644 index 000000000000..f526608ecd6e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/UserAssignedManagedIdentity.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class UserAssignedManagedIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUserAssignedManagedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new UserAssignedManagedIdentity(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._clientId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._clientId.ToString()) : null, "clientId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal UserAssignedManagedIdentity(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/UtcClipTime.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/UtcClipTime.cs new file mode 100644 index 000000000000..acc25b66c241 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/UtcClipTime.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// 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. + /// + public partial class UtcClipTime : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUtcClipTime, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUtcClipTimeInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime __clipTime = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal)__clipTime).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal)__clipTime).OdataType = value ; } + + /// Backing field for property. + private global::System.DateTime _time; + + /// The time position on the timeline of the input media based on Utc time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime Time { get => this._time; set => this._time = value; } + + /// Creates an new instance. + public UtcClipTime() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__clipTime), __clipTime); + await eventListener.AssertObjectIsValid(nameof(__clipTime), __clipTime); + } + } + /// 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. + public partial interface IUtcClipTime : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTime + { + /// The time position on the timeline of the input media based on Utc time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The time position on the timeline of the input media based on Utc time.", + SerializedName = @"time", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime Time { get; set; } + + } + /// 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. + internal partial interface IUtcClipTimeInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IClipTimeInternal + { + /// The time position on the timeline of the input media based on Utc time. + global::System.DateTime Time { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/UtcClipTime.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/UtcClipTime.json.cs new file mode 100644 index 000000000000..24ada81bf46f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/UtcClipTime.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// 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. + /// + public partial class UtcClipTime + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUtcClipTime. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUtcClipTime. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IUtcClipTime FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new UtcClipTime(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __clipTime?.ToJson(container, serializationMode); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._time.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "time" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal UtcClipTime(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __clipTime = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ClipTime(json); + {_time = If( json?.PropertyT("time"), out var __jsonTime) ? global::System.DateTime.TryParse((string)__jsonTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeValue) ? __jsonTimeValue : Time : Time;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Video.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Video.cs new file mode 100644 index 000000000000..b2701ee40bad --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Video.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the basic properties for encoding the input video. + public partial class Video : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec __codec = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Codec(); + + /// Backing field for property. + private global::System.TimeSpan? _keyFrameInterval; + + /// + /// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 + /// format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the + /// KeyFrameInterval value will follow the input source setting. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? KeyFrameInterval { get => this._keyFrameInterval; set => this._keyFrameInterval = value; } + + /// + /// An optional label for the codec. The label can be used to control muxing behavior. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).Label = value ?? null; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal)__codec).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? _stretchMode; + + /// + /// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get => this._stretchMode; set => this._stretchMode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode? _syncMode; + + /// The Video Sync Mode + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode? SyncMode { get => this._syncMode; set => this._syncMode = value; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__codec), __codec); + await eventListener.AssertObjectIsValid(nameof(__codec), __codec); + } + + /// Creates an new instance. + public Video() + { + + } + } + /// Describes the basic properties for encoding the input video. + public partial interface IVideo : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodec + { + /// + /// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 + /// format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the + /// KeyFrameInterval value will follow the input source setting. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.", + SerializedName = @"keyFrameInterval", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? KeyFrameInterval { get; set; } + /// + /// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize", + SerializedName = @"stretchMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get; set; } + /// The Video Sync Mode + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Video Sync Mode", + SerializedName = @"syncMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode? SyncMode { get; set; } + + } + /// Describes the basic properties for encoding the input video. + internal partial interface IVideoInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ICodecInternal + { + /// + /// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 + /// format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the + /// KeyFrameInterval value will follow the input source setting. + /// + global::System.TimeSpan? KeyFrameInterval { get; set; } + /// + /// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get; set; } + /// The Video Sync Mode + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode? SyncMode { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/Video.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/Video.json.cs new file mode 100644 index 000000000000..1680a35c09e8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/Video.json.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the basic properties for encoding the input video. + public partial class Video + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.H265Video": + { + return new H265Video(json); + } + case "#Microsoft.Media.Image": + { + return new Image(json); + } + case "#Microsoft.Media.H264Video": + { + return new H264Video(json); + } + case "#Microsoft.Media.JpgImage": + { + return new JpgImage(json); + } + case "#Microsoft.Media.PngImage": + { + return new PngImage(json); + } + } + return new Video(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __codec?.ToJson(container, serializationMode); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._keyFrameInterval ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._keyFrameInterval)): null), "keyFrameInterval" ,container.Add ); + AddIf( null != (((object)this._stretchMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._stretchMode.ToString()) : null, "stretchMode" ,container.Add ); + AddIf( null != (((object)this._syncMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._syncMode.ToString()) : null, "syncMode" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Video(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __codec = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Codec(json); + {_keyFrameInterval = If( json?.PropertyT("keyFrameInterval"), out var __jsonKeyFrameInterval) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonKeyFrameInterval ) : KeyFrameInterval;} + {_stretchMode = If( json?.PropertyT("stretchMode"), out var __jsonStretchMode) ? (string)__jsonStretchMode : (string)StretchMode;} + {_syncMode = If( json?.PropertyT("syncMode"), out var __jsonSyncMode) ? (string)__jsonSyncMode : (string)SyncMode;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoAnalyzerPreset.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoAnalyzerPreset.cs new file mode 100644 index 000000000000..847800d46693 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoAnalyzerPreset.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file. + /// + public partial class VideoAnalyzerPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoAnalyzerPreset, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoAnalyzerPresetInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPreset __audioAnalyzerPreset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AudioAnalyzerPreset(); + + /// + /// The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you + /// know the language of your content, it is recommended that you specify it. The language must be specified explicitly for + /// AudioAnalysisMode::Basic, since automatic language detection is not included in basic mode. If the language isn't specified + /// or set to null, automatic language detection will choose the first language detected and process with the selected language + /// for the duration of the file. It does not currently support dynamically switching between languages after the first language + /// is detected. The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection + /// fails to find the language, transcription would fallback to 'en-US'." The list of supported languages is available here: + /// https://go.microsoft.com/fwlink/?linkid=2109463 + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string AudioLanguage { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetInternal)__audioAnalyzerPreset).AudioLanguage; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetInternal)__audioAnalyzerPreset).AudioLanguage = value ?? null; } + + /// + /// Dictionary containing key value pairs for parameters not exposed in the preset itself + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetExperimentalOptions ExperimentalOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetInternal)__audioAnalyzerPreset).ExperimentalOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetInternal)__audioAnalyzerPreset).ExperimentalOption = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType? _insightsToExtract; + + /// + /// Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', + /// and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio + /// insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended + /// that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you + /// expect some of your inputs to be audio only. Your Jobs in such conditions would error out. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType? InsightsToExtract { get => this._insightsToExtract; set => this._insightsToExtract = value; } + + /// + /// Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would + /// be chosen. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode? Mode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetInternal)__audioAnalyzerPreset).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetInternal)__audioAnalyzerPreset).Mode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode)""); } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__audioAnalyzerPreset).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IPresetInternal)__audioAnalyzerPreset).OdataType = value ; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__audioAnalyzerPreset), __audioAnalyzerPreset); + await eventListener.AssertObjectIsValid(nameof(__audioAnalyzerPreset), __audioAnalyzerPreset); + } + + /// Creates an new instance. + public VideoAnalyzerPreset() + { + + } + } + /// A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file. + public partial interface IVideoAnalyzerPreset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPreset + { + /// + /// Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', + /// and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio + /// insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended + /// that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you + /// expect some of your inputs to be audio only. Your Jobs in such conditions would error out. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your inputs to be audio only. Your Jobs in such conditions would error out.", + SerializedName = @"insightsToExtract", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType? InsightsToExtract { get; set; } + + } + /// A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file. + internal partial interface IVideoAnalyzerPresetInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IAudioAnalyzerPresetInternal + { + /// + /// Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', + /// and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio + /// insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended + /// that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you + /// expect some of your inputs to be audio only. Your Jobs in such conditions would error out. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType? InsightsToExtract { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoAnalyzerPreset.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoAnalyzerPreset.json.cs new file mode 100644 index 000000000000..746c4698b5d9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoAnalyzerPreset.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file. + /// + public partial class VideoAnalyzerPreset + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoAnalyzerPreset. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoAnalyzerPreset. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoAnalyzerPreset FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new VideoAnalyzerPreset(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __audioAnalyzerPreset?.ToJson(container, serializationMode); + AddIf( null != (((object)this._insightsToExtract)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._insightsToExtract.ToString()) : null, "insightsToExtract" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal VideoAnalyzerPreset(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __audioAnalyzerPreset = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.AudioAnalyzerPreset(json); + {_insightsToExtract = If( json?.PropertyT("insightsToExtract"), out var __jsonInsightsToExtract) ? (string)__jsonInsightsToExtract : (string)InsightsToExtract;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoLayer.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoLayer.cs new file mode 100644 index 000000000000..a9fa74020c4f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoLayer.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer. + /// + public partial class VideoLayer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayer, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayerInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer __layer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Layer(); + + /// Backing field for property. + private bool? _adaptiveBFrame; + + /// + /// Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on + /// whenever the video profile permits its use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? AdaptiveBFrame { get => this._adaptiveBFrame; set => this._adaptiveBFrame = value; } + + /// Backing field for property. + private int? _bFrame; + + /// + /// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number + /// based on the video profile and level. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? BFrame { get => this._bFrame; set => this._bFrame = value; } + + /// Backing field for property. + private int _bitrate; + + /// + /// The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required + /// field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int Bitrate { get => this._bitrate; set => this._bitrate = value; } + + /// Backing field for property. + private string _frameRate; + + /// + /// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N + /// are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints + /// on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate + /// as the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FrameRate { get => this._frameRate; set => this._frameRate = value; } + + /// + /// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For + /// example 50% means the output video has half as many pixels in height as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Height { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Height; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Height = value ?? null; } + + /// + /// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming + /// the output file. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Label = value ?? null; } + + /// Backing field for property. + private int? _maxBitrate; + + /// + /// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults + /// to the same value as bitrate. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? MaxBitrate { get => this._maxBitrate; set => this._maxBitrate = value; } + + /// Backing field for property. + private int? _slice; + + /// + /// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder + /// will use a single slice for each frame. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Slice { get => this._slice; set => this._slice = value; } + + /// + /// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example + /// 50% means the output video has half as many pixels in width as the input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Width { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Width; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal)__layer).Width = value ?? null; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__layer), __layer); + await eventListener.AssertObjectIsValid(nameof(__layer), __layer); + } + + /// Creates an new instance. + public VideoLayer() + { + + } + } + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer. + public partial interface IVideoLayer : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayer + { + /// + /// Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on + /// whenever the video profile permits its use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use.", + SerializedName = @"adaptiveBFrame", + PossibleTypes = new [] { typeof(bool) })] + bool? AdaptiveBFrame { get; set; } + /// + /// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number + /// based on the video profile and level. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level.", + SerializedName = @"bFrames", + PossibleTypes = new [] { typeof(int) })] + int? BFrame { get; set; } + /// + /// The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required + /// field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field.", + SerializedName = @"bitrate", + PossibleTypes = new [] { typeof(int) })] + int Bitrate { get; set; } + /// + /// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N + /// are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints + /// on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate + /// as the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video.", + SerializedName = @"frameRate", + PossibleTypes = new [] { typeof(string) })] + string FrameRate { get; set; } + /// + /// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults + /// to the same value as bitrate. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate.", + SerializedName = @"maxBitrate", + PossibleTypes = new [] { typeof(int) })] + int? MaxBitrate { get; set; } + /// + /// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder + /// will use a single slice for each frame. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame.", + SerializedName = @"slices", + PossibleTypes = new [] { typeof(int) })] + int? Slice { get; set; } + + } + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer. + internal partial interface IVideoLayerInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ILayerInternal + { + /// + /// Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on + /// whenever the video profile permits its use. + /// + bool? AdaptiveBFrame { get; set; } + /// + /// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number + /// based on the video profile and level. + /// + int? BFrame { get; set; } + /// + /// The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required + /// field. + /// + int Bitrate { get; set; } + /// + /// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N + /// are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints + /// on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate + /// as the input video. + /// + string FrameRate { get; set; } + /// + /// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults + /// to the same value as bitrate. + /// + int? MaxBitrate { get; set; } + /// + /// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder + /// will use a single slice for each frame. + /// + int? Slice { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoLayer.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoLayer.json.cs new file mode 100644 index 000000000000..6286876e6549 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoLayer.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the settings to be used when encoding the input video into a desired output bitrate layer. + /// + public partial class VideoLayer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoLayer FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new VideoLayer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __layer?.ToJson(container, serializationMode); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._bitrate), "bitrate" ,container.Add ); + AddIf( null != this._maxBitrate ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._maxBitrate) : null, "maxBitrate" ,container.Add ); + AddIf( null != this._bFrame ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._bFrame) : null, "bFrames" ,container.Add ); + AddIf( null != (((object)this._frameRate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._frameRate.ToString()) : null, "frameRate" ,container.Add ); + AddIf( null != this._slice ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._slice) : null, "slices" ,container.Add ); + AddIf( null != this._adaptiveBFrame ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._adaptiveBFrame) : null, "adaptiveBFrame" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal VideoLayer(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __layer = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Layer(json); + {_bitrate = If( json?.PropertyT("bitrate"), out var __jsonBitrate) ? (int)__jsonBitrate : Bitrate;} + {_maxBitrate = If( json?.PropertyT("maxBitrate"), out var __jsonMaxBitrate) ? (int?)__jsonMaxBitrate : MaxBitrate;} + {_bFrame = If( json?.PropertyT("bFrames"), out var __jsonBFrames) ? (int?)__jsonBFrames : BFrame;} + {_frameRate = If( json?.PropertyT("frameRate"), out var __jsonFrameRate) ? (string)__jsonFrameRate : (string)FrameRate;} + {_slice = If( json?.PropertyT("slices"), out var __jsonSlices) ? (int?)__jsonSlices : Slice;} + {_adaptiveBFrame = If( json?.PropertyT("adaptiveBFrame"), out var __jsonAdaptiveBFrame) ? (bool?)__jsonAdaptiveBFrame : AdaptiveBFrame;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoOverlay.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoOverlay.cs new file mode 100644 index 000000000000..c3c5f093b3c9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoOverlay.cs @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the properties of a video overlay. + public partial class VideoOverlay : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoOverlay, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoOverlayInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay __overlay = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Overlay(); + + /// + /// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public double? AudioGainLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).AudioGainLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).AudioGainLevel = value ?? default(double); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle _cropRectangle; + + /// An optional rectangular window used to crop the overlay image or video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle CropRectangle { get => (this._cropRectangle = this._cropRectangle ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Rectangle()); set => this._cropRectangle = value; } + + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropRectangleHeight { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)CropRectangle).Height; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)CropRectangle).Height = value ?? null; } + + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropRectangleLeft { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)CropRectangle).Left; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)CropRectangle).Left = value ?? null; } + + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropRectangleTop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)CropRectangle).Top; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)CropRectangle).Top = value ?? null; } + + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CropRectangleWidth { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)CropRectangle).Width; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)CropRectangle).Width = value ?? null; } + + /// + /// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format. + /// For example, PT30S to end the overlay at 30 seconds into the input video. If not specified or the value is greater than + /// the input video duration, the overlay will be applied until the end of the input video if the overlay media duration is + /// greater than the input video duration, else the overlay will last as long as the overlay media duration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? End { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).End; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).End = value ?? default(global::System.TimeSpan); } + + /// + /// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade in (same as PT0S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? FadeInDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).FadeInDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).FadeInDuration = value ?? default(global::System.TimeSpan); } + + /// + /// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If + /// not specified the default behavior is to have no fade out (same as PT0S). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? FadeOutDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).FadeOutDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).FadeOutDuration = value ?? default(global::System.TimeSpan); } + + /// + /// The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify + /// an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. + /// See https://aka.ms/mesformats for the complete list of supported audio and video file formats. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string InputLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).InputLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).InputLabel = value ; } + + /// Internal Acessors for CropRectangle + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoOverlayInternal.CropRectangle { get => (this._cropRectangle = this._cropRectangle ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Rectangle()); set { {_cropRectangle = value;} } } + + /// Internal Acessors for Position + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoOverlayInternal.Position { get => (this._position = this._position ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Rectangle()); set { {_position = value;} } } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).OdataType = value ; } + + /// Backing field for property. + private double? _opacity; + + /// + /// The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public double? Opacity { get => this._opacity; set => this._opacity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle _position; + + /// The location in the input video where the overlay is applied. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle Position { get => (this._position = this._position ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Rectangle()); set => this._position = value; } + + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PositionHeight { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Position).Height; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Position).Height = value ?? null; } + + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PositionLeft { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Position).Left; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Position).Left = value ?? null; } + + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PositionTop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Position).Top; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Position).Top = value ?? null; } + + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PositionWidth { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Position).Width; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangleInternal)Position).Width = value ?? null; } + + /// + /// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. + /// For example, PT05S to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the + /// beginning of the input video. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public global::System.TimeSpan? Start { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).Start; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal)__overlay).Start = value ?? default(global::System.TimeSpan); } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__overlay), __overlay); + await eventListener.AssertObjectIsValid(nameof(__overlay), __overlay); + } + + /// Creates an new instance. + public VideoOverlay() + { + + } + } + /// Describes the properties of a video overlay. + public partial interface IVideoOverlay : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlay + { + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"height", + PossibleTypes = new [] { typeof(string) })] + string CropRectangleHeight { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"left", + PossibleTypes = new [] { typeof(string) })] + string CropRectangleLeft { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"top", + PossibleTypes = new [] { typeof(string) })] + string CropRectangleTop { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"width", + PossibleTypes = new [] { typeof(string) })] + string CropRectangleWidth { get; set; } + /// + /// The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque.", + SerializedName = @"opacity", + PossibleTypes = new [] { typeof(double) })] + double? Opacity { get; set; } + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"height", + PossibleTypes = new [] { typeof(string) })] + string PositionHeight { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"left", + PossibleTypes = new [] { typeof(string) })] + string PositionLeft { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"top", + PossibleTypes = new [] { typeof(string) })] + string PositionTop { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%).", + SerializedName = @"width", + PossibleTypes = new [] { typeof(string) })] + string PositionWidth { get; set; } + + } + /// Describes the properties of a video overlay. + internal partial interface IVideoOverlayInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IOverlayInternal + { + /// An optional rectangular window used to crop the overlay image or video. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle CropRectangle { get; set; } + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string CropRectangleHeight { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + string CropRectangleLeft { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + string CropRectangleTop { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string CropRectangleWidth { get; set; } + /// + /// The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. + /// + double? Opacity { get; set; } + /// The location in the input video where the overlay is applied. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IRectangle Position { get; set; } + /// + /// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string PositionHeight { get; set; } + /// + /// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the + /// video (For example, 50%). + /// + string PositionLeft { get; set; } + /// + /// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video + /// (For example, 50%). + /// + string PositionTop { get; set; } + /// + /// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of + /// the video (For example, 50%). + /// + string PositionWidth { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoOverlay.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoOverlay.json.cs new file mode 100644 index 000000000000..f20ec15db66f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoOverlay.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Describes the properties of a video overlay. + public partial class VideoOverlay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoOverlay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoOverlay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoOverlay FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new VideoOverlay(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __overlay?.ToJson(container, serializationMode); + AddIf( null != this._position ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._position.ToJson(null,serializationMode) : null, "position" ,container.Add ); + AddIf( null != this._cropRectangle ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._cropRectangle.ToJson(null,serializationMode) : null, "cropRectangle" ,container.Add ); + AddIf( null != this._opacity ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((double)this._opacity) : null, "opacity" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal VideoOverlay(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __overlay = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Overlay(json); + {_position = If( json?.PropertyT("position"), out var __jsonPosition) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Rectangle.FromJson(__jsonPosition) : Position;} + {_cropRectangle = If( json?.PropertyT("cropRectangle"), out var __jsonCropRectangle) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.Rectangle.FromJson(__jsonCropRectangle) : CropRectangle;} + {_opacity = If( json?.PropertyT("opacity"), out var __jsonOpacity) ? (double?)__jsonOpacity : Opacity;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoTrackDescriptor.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoTrackDescriptor.cs new file mode 100644 index 000000000000..7bf5f5322fdc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoTrackDescriptor.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A TrackSelection to select video tracks. + public partial class VideoTrackDescriptor : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoTrackDescriptor, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoTrackDescriptorInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor __trackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TrackDescriptor(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__trackDescriptor).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal)__trackDescriptor).OdataType = value ; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackDescriptor), __trackDescriptor); + await eventListener.AssertObjectIsValid(nameof(__trackDescriptor), __trackDescriptor); + } + + /// Creates an new instance. + public VideoTrackDescriptor() + { + + } + } + /// A TrackSelection to select video tracks. + public partial interface IVideoTrackDescriptor : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptor + { + + } + /// A TrackSelection to select video tracks. + internal partial interface IVideoTrackDescriptorInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.ITrackDescriptorInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoTrackDescriptor.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoTrackDescriptor.json.cs new file mode 100644 index 000000000000..fe03ac01f2ea --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20211101/VideoTrackDescriptor.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A TrackSelection to select video tracks. + public partial class VideoTrackDescriptor + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoTrackDescriptor. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoTrackDescriptor. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.IVideoTrackDescriptor FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new VideoTrackDescriptor(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackDescriptor?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal VideoTrackDescriptor(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackDescriptor = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20211101.TrackDescriptor(json); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilter.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilter.cs new file mode 100644 index 000000000000..4fa88c38c68f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilter.cs @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An Account Filter. + public partial class AccountFilter : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// The first quality bitrate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? FirstQualityBitrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).FirstQualityBitrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).FirstQualityBitrate = value ?? default(int); } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for FirstQuality + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterInternal.FirstQuality { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).FirstQuality; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).FirstQuality = value; } + + /// Internal Acessors for PresentationTimeRange + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterInternal.PresentationTimeRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRange = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.MediaFilterProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// The absolute end time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeEndTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeEndTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeEndTimestamp = value ?? default(long); } + + /// The indicator of forcing existing of end time stamp. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? PresentationTimeRangeForceEndTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeForceEndTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeForceEndTimestamp = value ?? default(bool); } + + /// The relative to end right edge. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeLiveBackoffDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeLiveBackoffDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeLiveBackoffDuration = value ?? default(long); } + + /// The relative to end sliding window. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangePresentationWindowDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangePresentationWindowDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangePresentationWindowDuration = value ?? default(long); } + + /// The absolute start time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeStartTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeStartTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeStartTimestamp = value ?? default(long); } + + /// The time scale of time stamps. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeTimescale { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeTimescale; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeTimescale = value ?? default(long); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties _property; + + /// The Media Filter properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.MediaFilterProperties()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The tracks selection conditions. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] Track { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).Track; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).Track = value ?? null /* arrayOf */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public AccountFilter() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// An Account Filter. + public partial interface IAccountFilter : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// The first quality bitrate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The first quality bitrate.", + SerializedName = @"bitrate", + PossibleTypes = new [] { typeof(int) })] + int? FirstQualityBitrate { get; set; } + /// The absolute end time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The absolute end time boundary.", + SerializedName = @"endTimestamp", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeEndTimestamp { get; set; } + /// The indicator of forcing existing of end time stamp. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The indicator of forcing existing of end time stamp.", + SerializedName = @"forceEndTimestamp", + PossibleTypes = new [] { typeof(bool) })] + bool? PresentationTimeRangeForceEndTimestamp { get; set; } + /// The relative to end right edge. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative to end right edge.", + SerializedName = @"liveBackoffDuration", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeLiveBackoffDuration { get; set; } + /// The relative to end sliding window. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative to end sliding window.", + SerializedName = @"presentationWindowDuration", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangePresentationWindowDuration { get; set; } + /// The absolute start time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The absolute start time boundary.", + SerializedName = @"startTimestamp", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeStartTimestamp { get; set; } + /// The time scale of time stamps. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time scale of time stamps.", + SerializedName = @"timescale", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeTimescale { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// The tracks selection conditions. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The tracks selection conditions.", + SerializedName = @"tracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] Track { get; set; } + + } + /// An Account Filter. + internal partial interface IAccountFilterInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// The first quality. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality FirstQuality { get; set; } + /// The first quality bitrate. + int? FirstQualityBitrate { get; set; } + /// The presentation time range. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange PresentationTimeRange { get; set; } + /// The absolute end time boundary. + long? PresentationTimeRangeEndTimestamp { get; set; } + /// The indicator of forcing existing of end time stamp. + bool? PresentationTimeRangeForceEndTimestamp { get; set; } + /// The relative to end right edge. + long? PresentationTimeRangeLiveBackoffDuration { get; set; } + /// The relative to end sliding window. + long? PresentationTimeRangePresentationWindowDuration { get; set; } + /// The absolute start time boundary. + long? PresentationTimeRangeStartTimestamp { get; set; } + /// The time scale of time stamps. + long? PresentationTimeRangeTimescale { get; set; } + /// The Media Filter properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties Property { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// The tracks selection conditions. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] Track { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilter.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilter.json.cs new file mode 100644 index 000000000000..2a84aef84136 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilter.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An Account Filter. + public partial class AccountFilter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AccountFilter(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.MediaFilterProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AccountFilter(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilterCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilterCollection.cs new file mode 100644 index 000000000000..92bacf7804c8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilterCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of AccountFilter items. + public partial class AccountFilterCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterCollectionInternal + { + + /// Backing field for property. + private string _odataNextLink; + + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter[] _value; + + /// A collection of AccountFilter items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AccountFilterCollection() + { + + } + } + /// A collection of AccountFilter items. + public partial interface IAccountFilterCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A link to the next page of the collection (when the collection contains too many results to return in one response).", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// A collection of AccountFilter items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of AccountFilter items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter[] Value { get; set; } + + } + /// A collection of AccountFilter items. + internal partial interface IAccountFilterCollectionInternal + + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + string OdataNextLink { get; set; } + /// A collection of AccountFilter items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilterCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilterCollection.json.cs new file mode 100644 index 000000000000..c3707bad56a8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AccountFilterCollection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of AccountFilter items. + public partial class AccountFilterCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AccountFilterCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilter) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AccountFilter.FromJson(__u) )) ))() : null : Value;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAccountFilterCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AccountFilterCollection(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiAccessControl.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiAccessControl.cs new file mode 100644 index 000000000000..8400ffb850e7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiAccessControl.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Akamai access control + public partial class AkamaiAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControlInternal + { + + /// + /// Backing field for property. + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] _akamaiSignatureHeaderAuthenticationKeyList; + + /// authentication key list + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get => this._akamaiSignatureHeaderAuthenticationKeyList; set => this._akamaiSignatureHeaderAuthenticationKeyList = value; } + + /// Creates an new instance. + public AkamaiAccessControl() + { + + } + } + /// Akamai access control + public partial interface IAkamaiAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// authentication key list + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"authentication key list", + SerializedName = @"akamaiSignatureHeaderAuthenticationKeyList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get; set; } + + } + /// Akamai access control + internal partial interface IAkamaiAccessControlInternal + + { + /// authentication key list + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiAccessControl.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiAccessControl.json.cs new file mode 100644 index 000000000000..2f0cc8d98c0f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiAccessControl.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Akamai access control + public partial class AkamaiAccessControl + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AkamaiAccessControl(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_akamaiSignatureHeaderAuthenticationKeyList = If( json?.PropertyT("akamaiSignatureHeaderAuthenticationKeyList"), out var __jsonAkamaiSignatureHeaderAuthenticationKeyList) ? If( __jsonAkamaiSignatureHeaderAuthenticationKeyList as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AkamaiSignatureHeaderAuthenticationKey.FromJson(__u) )) ))() : null : AkamaiSignatureHeaderAuthenticationKeyList;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AkamaiAccessControl(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._akamaiSignatureHeaderAuthenticationKeyList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._akamaiSignatureHeaderAuthenticationKeyList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("akamaiSignatureHeaderAuthenticationKeyList",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiSignatureHeaderAuthenticationKey.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiSignatureHeaderAuthenticationKey.cs new file mode 100644 index 000000000000..d80b4dde0c93 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiSignatureHeaderAuthenticationKey.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Akamai Signature Header authentication key. + public partial class AkamaiSignatureHeaderAuthenticationKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKeyInternal + { + + /// Backing field for property. + private string _base64Key; + + /// authentication key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Base64Key { get => this._base64Key; set => this._base64Key = value; } + + /// Backing field for property. + private global::System.DateTime? _expiration; + + /// The expiration time of the authentication key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Expiration { get => this._expiration; set => this._expiration = value; } + + /// Backing field for property. + private string _identifier; + + /// identifier of the key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Identifier { get => this._identifier; set => this._identifier = value; } + + /// Creates an new instance. + public AkamaiSignatureHeaderAuthenticationKey() + { + + } + } + /// Akamai Signature Header authentication key. + public partial interface IAkamaiSignatureHeaderAuthenticationKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// authentication key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"authentication key", + SerializedName = @"base64Key", + PossibleTypes = new [] { typeof(string) })] + string Base64Key { get; set; } + /// The expiration time of the authentication key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The expiration time of the authentication key.", + SerializedName = @"expiration", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Expiration { get; set; } + /// identifier of the key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"identifier of the key", + SerializedName = @"identifier", + PossibleTypes = new [] { typeof(string) })] + string Identifier { get; set; } + + } + /// Akamai Signature Header authentication key. + internal partial interface IAkamaiSignatureHeaderAuthenticationKeyInternal + + { + /// authentication key + string Base64Key { get; set; } + /// The expiration time of the authentication key. + global::System.DateTime? Expiration { get; set; } + /// identifier of the key + string Identifier { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiSignatureHeaderAuthenticationKey.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiSignatureHeaderAuthenticationKey.json.cs new file mode 100644 index 000000000000..a34b17c5ce0b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AkamaiSignatureHeaderAuthenticationKey.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Akamai Signature Header authentication key. + public partial class AkamaiSignatureHeaderAuthenticationKey + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AkamaiSignatureHeaderAuthenticationKey(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_identifier = If( json?.PropertyT("identifier"), out var __jsonIdentifier) ? (string)__jsonIdentifier : (string)Identifier;} + {_base64Key = If( json?.PropertyT("base64Key"), out var __jsonBase64Key) ? (string)__jsonBase64Key : (string)Base64Key;} + {_expiration = If( json?.PropertyT("expiration"), out var __jsonExpiration) ? global::System.DateTime.TryParse((string)__jsonExpiration, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpirationValue) ? __jsonExpirationValue : Expiration : Expiration;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AkamaiSignatureHeaderAuthenticationKey(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._identifier)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._identifier.ToString()) : null, "identifier" ,container.Add ); + AddIf( null != (((object)this._base64Key)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._base64Key.ToString()) : null, "base64Key" ,container.Add ); + AddIf( null != this._expiration ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._expiration?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expiration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCapacity.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCapacity.cs new file mode 100644 index 000000000000..07c71b2a8d6b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCapacity.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint sku capacity. + public partial class ArmStreamingEndpointCapacity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacity, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal + { + + /// Backing field for property. + private int? _default; + + /// The streaming endpoint default capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Default { get => this._default; set => this._default = value; } + + /// Backing field for property. + private int? _maximum; + + /// The streaming endpoint maximum capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Maximum { get => this._maximum; set => this._maximum = value; } + + /// Internal Acessors for ScaleType + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal.ScaleType { get => this._scaleType; set { {_scaleType = value;} } } + + /// Backing field for property. + private int? _minimum; + + /// The streaming endpoint minimum capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Minimum { get => this._minimum; set => this._minimum = value; } + + /// Backing field for property. + private string _scaleType; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ScaleType { get => this._scaleType; } + + /// Creates an new instance. + public ArmStreamingEndpointCapacity() + { + + } + } + /// The streaming endpoint sku capacity. + public partial interface IArmStreamingEndpointCapacity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The streaming endpoint default capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint default capacity.", + SerializedName = @"default", + PossibleTypes = new [] { typeof(int) })] + int? Default { get; set; } + /// The streaming endpoint maximum capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint maximum capacity.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(int) })] + int? Maximum { get; set; } + /// The streaming endpoint minimum capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint minimum capacity.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(int) })] + int? Minimum { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"scaleType", + PossibleTypes = new [] { typeof(string) })] + string ScaleType { get; } + + } + /// The streaming endpoint sku capacity. + internal partial interface IArmStreamingEndpointCapacityInternal + + { + /// The streaming endpoint default capacity. + int? Default { get; set; } + /// The streaming endpoint maximum capacity. + int? Maximum { get; set; } + /// The streaming endpoint minimum capacity. + int? Minimum { get; set; } + + string ScaleType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCapacity.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCapacity.json.cs new file mode 100644 index 000000000000..825ad0459c4f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCapacity.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint sku capacity. + public partial class ArmStreamingEndpointCapacity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ArmStreamingEndpointCapacity(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_scaleType = If( json?.PropertyT("scaleType"), out var __jsonScaleType) ? (string)__jsonScaleType : (string)ScaleType;} + {_default = If( json?.PropertyT("default"), out var __jsonDefault) ? (int?)__jsonDefault : Default;} + {_minimum = If( json?.PropertyT("minimum"), out var __jsonMinimum) ? (int?)__jsonMinimum : Minimum;} + {_maximum = If( json?.PropertyT("maximum"), out var __jsonMaximum) ? (int?)__jsonMaximum : Maximum;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacity FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ArmStreamingEndpointCapacity(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._scaleType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._scaleType.ToString()) : null, "scaleType" ,container.Add ); + } + AddIf( null != this._default ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._default) : null, "default" ,container.Add ); + AddIf( null != this._minimum ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._minimum) : null, "minimum" ,container.Add ); + AddIf( null != this._maximum ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._maximum) : null, "maximum" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCurrentSku.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCurrentSku.cs new file mode 100644 index 000000000000..8be48d0fc5f7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCurrentSku.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint current sku. + public partial class ArmStreamingEndpointCurrentSku : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSku, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSkuInternal + { + + /// Backing field for property. + private int? _capacity; + + /// The streaming endpoint sku capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Capacity { get => this._capacity; set => this._capacity = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSkuInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// The streaming endpoint sku name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Creates an new instance. + public ArmStreamingEndpointCurrentSku() + { + + } + } + /// The streaming endpoint current sku. + public partial interface IArmStreamingEndpointCurrentSku : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The streaming endpoint sku capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint sku capacity.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? Capacity { get; set; } + /// The streaming endpoint sku name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The streaming endpoint sku name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + + } + /// The streaming endpoint current sku. + internal partial interface IArmStreamingEndpointCurrentSkuInternal + + { + /// The streaming endpoint sku capacity. + int? Capacity { get; set; } + /// The streaming endpoint sku name. + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCurrentSku.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCurrentSku.json.cs new file mode 100644 index 000000000000..e0461a54d9cf --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointCurrentSku.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint current sku. + public partial class ArmStreamingEndpointCurrentSku + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ArmStreamingEndpointCurrentSku(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : Capacity;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSku. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSku. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ArmStreamingEndpointCurrentSku(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != this._capacity ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._capacity) : null, "capacity" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSku.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSku.cs new file mode 100644 index 000000000000..32529f60dbb4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSku.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint sku. + public partial class ArmStreamingEndpointSku : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSku, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInternal + { + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// The streaming endpoint sku name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Creates an new instance. + public ArmStreamingEndpointSku() + { + + } + } + /// The streaming endpoint sku. + public partial interface IArmStreamingEndpointSku : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The streaming endpoint sku name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The streaming endpoint sku name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + + } + /// The streaming endpoint sku. + internal partial interface IArmStreamingEndpointSkuInternal + + { + /// The streaming endpoint sku name. + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSku.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSku.json.cs new file mode 100644 index 000000000000..4f986e81a99a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSku.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint sku. + public partial class ArmStreamingEndpointSku + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ArmStreamingEndpointSku(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSku. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSku. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ArmStreamingEndpointSku(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSkuInfo.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSkuInfo.cs new file mode 100644 index 000000000000..bd2a2907631c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSkuInfo.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class ArmStreamingEndpointSkuInfo : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacity _capacity; + + /// The streaming endpoint sku capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacity Capacity { get => (this._capacity = this._capacity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointCapacity()); set => this._capacity = value; } + + /// The streaming endpoint default capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? CapacityDefault { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal)Capacity).Default; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal)Capacity).Default = value ?? default(int); } + + /// The streaming endpoint maximum capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? CapacityMaximum { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal)Capacity).Maximum; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal)Capacity).Maximum = value ?? default(int); } + + /// The streaming endpoint minimum capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? CapacityMinimum { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal)Capacity).Minimum; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal)Capacity).Minimum = value ?? default(int); } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CapacityScaleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal)Capacity).ScaleType; } + + /// Internal Acessors for Capacity + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacity Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfoInternal.Capacity { get => (this._capacity = this._capacity ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointCapacity()); set { {_capacity = value;} } } + + /// Internal Acessors for CapacityScaleType + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfoInternal.CapacityScaleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal)Capacity).ScaleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacityInternal)Capacity).ScaleType = value; } + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSku Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfoInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointSku()); set { {_sku = value;} } } + + /// Internal Acessors for SkuName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfoInternal.SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInternal)Sku).Name = value; } + + /// Backing field for property. + private string _resourceType; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ResourceType { get => this._resourceType; set => this._resourceType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSku _sku; + + /// The streaming endpoint sku. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointSku()); set => this._sku = value; } + + /// The streaming endpoint sku name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInternal)Sku).Name; } + + /// Creates an new instance. + public ArmStreamingEndpointSkuInfo() + { + + } + } + public partial interface IArmStreamingEndpointSkuInfo : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The streaming endpoint default capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint default capacity.", + SerializedName = @"default", + PossibleTypes = new [] { typeof(int) })] + int? CapacityDefault { get; set; } + /// The streaming endpoint maximum capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint maximum capacity.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(int) })] + int? CapacityMaximum { get; set; } + /// The streaming endpoint minimum capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint minimum capacity.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(int) })] + int? CapacityMinimum { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"scaleType", + PossibleTypes = new [] { typeof(string) })] + string CapacityScaleType { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"resourceType", + PossibleTypes = new [] { typeof(string) })] + string ResourceType { get; set; } + /// The streaming endpoint sku name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The streaming endpoint sku name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string SkuName { get; } + + } + internal partial interface IArmStreamingEndpointSkuInfoInternal + + { + /// The streaming endpoint sku capacity. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCapacity Capacity { get; set; } + /// The streaming endpoint default capacity. + int? CapacityDefault { get; set; } + /// The streaming endpoint maximum capacity. + int? CapacityMaximum { get; set; } + /// The streaming endpoint minimum capacity. + int? CapacityMinimum { get; set; } + + string CapacityScaleType { get; set; } + + string ResourceType { get; set; } + /// The streaming endpoint sku. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSku Sku { get; set; } + /// The streaming endpoint sku name. + string SkuName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSkuInfo.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSkuInfo.json.cs new file mode 100644 index 000000000000..abb1c9fe574b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ArmStreamingEndpointSkuInfo.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class ArmStreamingEndpointSkuInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ArmStreamingEndpointSkuInfo(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointCapacity.FromJson(__jsonCapacity) : Capacity;} + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointSku.FromJson(__jsonSku) : Sku;} + {_resourceType = If( json?.PropertyT("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)ResourceType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ArmStreamingEndpointSkuInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._capacity ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._capacity.ToJson(null,serializationMode) : null, "capacity" ,container.Add ); + AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); + AddIf( null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/Asset.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/Asset.cs new file mode 100644 index 000000000000..ad0487dcb0bd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/Asset.cs @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An Asset. + public partial class Asset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// The alternate ID of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string AlternateId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).AlternateId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).AlternateId = value ?? null; } + + /// The Asset ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string AssetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).AssetId; } + + /// The name of the asset blob container. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).Container = value ?? null; } + + /// The creation date of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).Created; } + + /// The Asset description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).Description = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// The last modified date of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).LastModified; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for AssetId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetInternal.AssetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).AssetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).AssetId = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetInternal.Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).Created; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).Created = value; } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetInternal.LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).LastModified; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).LastModified = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetProperties()); set { {_property = value;} } } + + /// Internal Acessors for StorageEncryptionFormat + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetInternal.StorageEncryptionFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).StorageEncryptionFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).StorageEncryptionFormat = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetProperties _property; + + /// The resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetProperties()); set => this._property = value; } + + /// The name of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string StorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).StorageAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).StorageAccountName = value ?? null; } + + /// The Asset encryption format. One of None or MediaStorageEncryption. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat? StorageEncryptionFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal)Property).StorageEncryptionFormat; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public Asset() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// An Asset. + public partial interface IAsset : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// The alternate ID of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The alternate ID of the Asset.", + SerializedName = @"alternateId", + PossibleTypes = new [] { typeof(string) })] + string AlternateId { get; set; } + /// The Asset ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Asset ID.", + SerializedName = @"assetId", + PossibleTypes = new [] { typeof(string) })] + string AssetId { get; } + /// The name of the asset blob container. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the asset blob container.", + SerializedName = @"container", + PossibleTypes = new [] { typeof(string) })] + string Container { get; set; } + /// The creation date of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation date of the Asset.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// The Asset description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Asset description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The last modified date of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The last modified date of the Asset.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// The name of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the storage account.", + SerializedName = @"storageAccountName", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountName { get; set; } + /// The Asset encryption format. One of None or MediaStorageEncryption. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Asset encryption format. One of None or MediaStorageEncryption.", + SerializedName = @"storageEncryptionFormat", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat? StorageEncryptionFormat { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// An Asset. + internal partial interface IAssetInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// The alternate ID of the Asset. + string AlternateId { get; set; } + /// The Asset ID. + string AssetId { get; set; } + /// The name of the asset blob container. + string Container { get; set; } + /// The creation date of the Asset. + global::System.DateTime? Created { get; set; } + /// The Asset description. + string Description { get; set; } + /// The last modified date of the Asset. + global::System.DateTime? LastModified { get; set; } + /// The resource properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetProperties Property { get; set; } + /// The name of the storage account. + string StorageAccountName { get; set; } + /// The Asset encryption format. One of None or MediaStorageEncryption. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat? StorageEncryptionFormat { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/Asset.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/Asset.json.cs new file mode 100644 index 000000000000..3b5d1d3c6994 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/Asset.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An Asset. + public partial class Asset + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Asset(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Asset(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetCollection.cs new file mode 100644 index 000000000000..425bde96554a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of Asset items. + public partial class AssetCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetCollectionInternal + { + + /// Backing field for property. + private string _odataNextLink; + + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset[] _value; + + /// A collection of Asset items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AssetCollection() + { + + } + } + /// A collection of Asset items. + public partial interface IAssetCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A link to the next page of the collection (when the collection contains too many results to return in one response).", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// A collection of Asset items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of Asset items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset[] Value { get; set; } + + } + /// A collection of Asset items. + internal partial interface IAssetCollectionInternal + + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + string OdataNextLink { get; set; } + /// A collection of Asset items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetCollection.json.cs new file mode 100644 index 000000000000..22dac78e5c0e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetCollection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of Asset items. + public partial class AssetCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsset) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.Asset.FromJson(__u) )) ))() : null : Value;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetCollection(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetContainerSas.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetContainerSas.cs new file mode 100644 index 000000000000..8f2a103b61ba --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetContainerSas.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Asset Storage container SAS URLs. + public partial class AssetContainerSas : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetContainerSas, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetContainerSasInternal + { + + /// Backing field for property. + private string[] _url; + + /// The list of Asset container SAS URLs. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] Url { get => this._url; set => this._url = value; } + + /// Creates an new instance. + public AssetContainerSas() + { + + } + } + /// The Asset Storage container SAS URLs. + public partial interface IAssetContainerSas : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The list of Asset container SAS URLs. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of Asset container SAS URLs.", + SerializedName = @"assetContainerSasUrls", + PossibleTypes = new [] { typeof(string) })] + string[] Url { get; set; } + + } + /// The Asset Storage container SAS URLs. + internal partial interface IAssetContainerSasInternal + + { + /// The list of Asset container SAS URLs. + string[] Url { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetContainerSas.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetContainerSas.json.cs new file mode 100644 index 000000000000..904e4f950e10 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetContainerSas.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Asset Storage container SAS URLs. + public partial class AssetContainerSas + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetContainerSas(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_url = If( json?.PropertyT("assetContainerSasUrls"), out var __jsonAssetContainerSasUrls) ? If( __jsonAssetContainerSasUrls as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Url;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetContainerSas. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetContainerSas. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetContainerSas FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetContainerSas(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._url) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._url ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("assetContainerSasUrls",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFileEncryptionMetadata.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFileEncryptionMetadata.cs new file mode 100644 index 000000000000..ae0f8d80d450 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFileEncryptionMetadata.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Asset File Storage encryption metadata. + public partial class AssetFileEncryptionMetadata : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadataInternal + { + + /// Backing field for property. + private string _assetFileId; + + /// The Asset File Id. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AssetFileId { get => this._assetFileId; set => this._assetFileId = value; } + + /// Backing field for property. + private string _assetFileName; + + /// The Asset File name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AssetFileName { get => this._assetFileName; set => this._assetFileName = value; } + + /// Backing field for property. + private string _initializationVector; + + /// The Asset File initialization vector. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string InitializationVector { get => this._initializationVector; set => this._initializationVector = value; } + + /// Creates an new instance. + public AssetFileEncryptionMetadata() + { + + } + } + /// The Asset File Storage encryption metadata. + public partial interface IAssetFileEncryptionMetadata : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The Asset File Id. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Asset File Id.", + SerializedName = @"assetFileId", + PossibleTypes = new [] { typeof(string) })] + string AssetFileId { get; set; } + /// The Asset File name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Asset File name.", + SerializedName = @"assetFileName", + PossibleTypes = new [] { typeof(string) })] + string AssetFileName { get; set; } + /// The Asset File initialization vector. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Asset File initialization vector.", + SerializedName = @"initializationVector", + PossibleTypes = new [] { typeof(string) })] + string InitializationVector { get; set; } + + } + /// The Asset File Storage encryption metadata. + internal partial interface IAssetFileEncryptionMetadataInternal + + { + /// The Asset File Id. + string AssetFileId { get; set; } + /// The Asset File name. + string AssetFileName { get; set; } + /// The Asset File initialization vector. + string InitializationVector { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFileEncryptionMetadata.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFileEncryptionMetadata.json.cs new file mode 100644 index 000000000000..72b43969132c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFileEncryptionMetadata.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Asset File Storage encryption metadata. + public partial class AssetFileEncryptionMetadata + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetFileEncryptionMetadata(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_initializationVector = If( json?.PropertyT("initializationVector"), out var __jsonInitializationVector) ? (string)__jsonInitializationVector : (string)InitializationVector;} + {_assetFileName = If( json?.PropertyT("assetFileName"), out var __jsonAssetFileName) ? (string)__jsonAssetFileName : (string)AssetFileName;} + {_assetFileId = If( json?.PropertyT("assetFileId"), out var __jsonAssetFileId) ? (string)__jsonAssetFileId : (string)AssetFileId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetFileEncryptionMetadata(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._initializationVector)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._initializationVector.ToString()) : null, "initializationVector" ,container.Add ); + AddIf( null != (((object)this._assetFileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._assetFileName.ToString()) : null, "assetFileName" ,container.Add ); + AddIf( null != (((object)this._assetFileId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._assetFileId.ToString()) : null, "assetFileId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilter.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilter.cs new file mode 100644 index 000000000000..0d40dcad9750 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilter.cs @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An Asset Filter. + public partial class AssetFilter : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// The first quality bitrate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? FirstQualityBitrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).FirstQualityBitrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).FirstQualityBitrate = value ?? default(int); } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for FirstQuality + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterInternal.FirstQuality { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).FirstQuality; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).FirstQuality = value; } + + /// Internal Acessors for PresentationTimeRange + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterInternal.PresentationTimeRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRange = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.MediaFilterProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// The absolute end time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeEndTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeEndTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeEndTimestamp = value ?? default(long); } + + /// The indicator of forcing existing of end time stamp. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? PresentationTimeRangeForceEndTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeForceEndTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeForceEndTimestamp = value ?? default(bool); } + + /// The relative to end right edge. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeLiveBackoffDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeLiveBackoffDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeLiveBackoffDuration = value ?? default(long); } + + /// The relative to end sliding window. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangePresentationWindowDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangePresentationWindowDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangePresentationWindowDuration = value ?? default(long); } + + /// The absolute start time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeStartTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeStartTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeStartTimestamp = value ?? default(long); } + + /// The time scale of time stamps. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeTimescale { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeTimescale; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).PresentationTimeRangeTimescale = value ?? default(long); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties _property; + + /// The Media Filter properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.MediaFilterProperties()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The tracks selection conditions. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] Track { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).Track; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal)Property).Track = value ?? null /* arrayOf */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public AssetFilter() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// An Asset Filter. + public partial interface IAssetFilter : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// The first quality bitrate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The first quality bitrate.", + SerializedName = @"bitrate", + PossibleTypes = new [] { typeof(int) })] + int? FirstQualityBitrate { get; set; } + /// The absolute end time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The absolute end time boundary.", + SerializedName = @"endTimestamp", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeEndTimestamp { get; set; } + /// The indicator of forcing existing of end time stamp. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The indicator of forcing existing of end time stamp.", + SerializedName = @"forceEndTimestamp", + PossibleTypes = new [] { typeof(bool) })] + bool? PresentationTimeRangeForceEndTimestamp { get; set; } + /// The relative to end right edge. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative to end right edge.", + SerializedName = @"liveBackoffDuration", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeLiveBackoffDuration { get; set; } + /// The relative to end sliding window. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative to end sliding window.", + SerializedName = @"presentationWindowDuration", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangePresentationWindowDuration { get; set; } + /// The absolute start time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The absolute start time boundary.", + SerializedName = @"startTimestamp", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeStartTimestamp { get; set; } + /// The time scale of time stamps. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time scale of time stamps.", + SerializedName = @"timescale", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeTimescale { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// The tracks selection conditions. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The tracks selection conditions.", + SerializedName = @"tracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] Track { get; set; } + + } + /// An Asset Filter. + internal partial interface IAssetFilterInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// The first quality. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality FirstQuality { get; set; } + /// The first quality bitrate. + int? FirstQualityBitrate { get; set; } + /// The presentation time range. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange PresentationTimeRange { get; set; } + /// The absolute end time boundary. + long? PresentationTimeRangeEndTimestamp { get; set; } + /// The indicator of forcing existing of end time stamp. + bool? PresentationTimeRangeForceEndTimestamp { get; set; } + /// The relative to end right edge. + long? PresentationTimeRangeLiveBackoffDuration { get; set; } + /// The relative to end sliding window. + long? PresentationTimeRangePresentationWindowDuration { get; set; } + /// The absolute start time boundary. + long? PresentationTimeRangeStartTimestamp { get; set; } + /// The time scale of time stamps. + long? PresentationTimeRangeTimescale { get; set; } + /// The Media Filter properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties Property { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// The tracks selection conditions. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] Track { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilter.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilter.json.cs new file mode 100644 index 000000000000..97f9796c1415 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilter.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An Asset Filter. + public partial class AssetFilter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetFilter(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.MediaFilterProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetFilter(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilterCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilterCollection.cs new file mode 100644 index 000000000000..012aab0aca40 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilterCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of AssetFilter items. + public partial class AssetFilterCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterCollectionInternal + { + + /// Backing field for property. + private string _odataNextLink; + + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter[] _value; + + /// A collection of AssetFilter items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AssetFilterCollection() + { + + } + } + /// A collection of AssetFilter items. + public partial interface IAssetFilterCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A link to the next page of the collection (when the collection contains too many results to return in one response).", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// A collection of AssetFilter items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of AssetFilter items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter[] Value { get; set; } + + } + /// A collection of AssetFilter items. + internal partial interface IAssetFilterCollectionInternal + + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + string OdataNextLink { get; set; } + /// A collection of AssetFilter items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilterCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilterCollection.json.cs new file mode 100644 index 000000000000..b9d26dd2bd1f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetFilterCollection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of AssetFilter items. + public partial class AssetFilterCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetFilterCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilter) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetFilter.FromJson(__u) )) ))() : null : Value;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFilterCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetFilterCollection(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetProperties.cs new file mode 100644 index 000000000000..8a644c50970c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetProperties.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Asset properties. + public partial class AssetProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal + { + + /// Backing field for property. + private string _alternateId; + + /// The alternate ID of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AlternateId { get => this._alternateId; set => this._alternateId = value; } + + /// Backing field for property. + private string _assetId; + + /// The Asset ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AssetId { get => this._assetId; } + + /// Backing field for property. + private string _container; + + /// The name of the asset blob container. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Container { get => this._container; set => this._container = value; } + + /// Backing field for property. + private global::System.DateTime? _created; + + /// The creation date of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private string _description; + + /// The Asset description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModified; + + /// The last modified date of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? LastModified { get => this._lastModified; } + + /// Internal Acessors for AssetId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal.AssetId { get => this._assetId; set { {_assetId = value;} } } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal.Created { get => this._created; set { {_created = value;} } } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal.LastModified { get => this._lastModified; set { {_lastModified = value;} } } + + /// Internal Acessors for StorageEncryptionFormat + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetPropertiesInternal.StorageEncryptionFormat { get => this._storageEncryptionFormat; set { {_storageEncryptionFormat = value;} } } + + /// Backing field for property. + private string _storageAccountName; + + /// The name of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string StorageAccountName { get => this._storageAccountName; set => this._storageAccountName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat? _storageEncryptionFormat; + + /// The Asset encryption format. One of None or MediaStorageEncryption. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat? StorageEncryptionFormat { get => this._storageEncryptionFormat; } + + /// Creates an new instance. + public AssetProperties() + { + + } + } + /// The Asset properties. + public partial interface IAssetProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The alternate ID of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The alternate ID of the Asset.", + SerializedName = @"alternateId", + PossibleTypes = new [] { typeof(string) })] + string AlternateId { get; set; } + /// The Asset ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Asset ID.", + SerializedName = @"assetId", + PossibleTypes = new [] { typeof(string) })] + string AssetId { get; } + /// The name of the asset blob container. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the asset blob container.", + SerializedName = @"container", + PossibleTypes = new [] { typeof(string) })] + string Container { get; set; } + /// The creation date of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation date of the Asset.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// The Asset description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Asset description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The last modified date of the Asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The last modified date of the Asset.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// The name of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the storage account.", + SerializedName = @"storageAccountName", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountName { get; set; } + /// The Asset encryption format. One of None or MediaStorageEncryption. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Asset encryption format. One of None or MediaStorageEncryption.", + SerializedName = @"storageEncryptionFormat", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat? StorageEncryptionFormat { get; } + + } + /// The Asset properties. + internal partial interface IAssetPropertiesInternal + + { + /// The alternate ID of the Asset. + string AlternateId { get; set; } + /// The Asset ID. + string AssetId { get; set; } + /// The name of the asset blob container. + string Container { get; set; } + /// The creation date of the Asset. + global::System.DateTime? Created { get; set; } + /// The Asset description. + string Description { get; set; } + /// The last modified date of the Asset. + global::System.DateTime? LastModified { get; set; } + /// The name of the storage account. + string StorageAccountName { get; set; } + /// The Asset encryption format. One of None or MediaStorageEncryption. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat? StorageEncryptionFormat { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetProperties.json.cs new file mode 100644 index 000000000000..321c90b802e1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetProperties.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Asset properties. + public partial class AssetProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_assetId = If( json?.PropertyT("assetId"), out var __jsonAssetId) ? (string)__jsonAssetId : (string)AssetId;} + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_lastModified = If( json?.PropertyT("lastModified"), out var __jsonLastModified) ? global::System.DateTime.TryParse((string)__jsonLastModified, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedValue) ? __jsonLastModifiedValue : LastModified : LastModified;} + {_alternateId = If( json?.PropertyT("alternateId"), out var __jsonAlternateId) ? (string)__jsonAlternateId : (string)AlternateId;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_container = If( json?.PropertyT("container"), out var __jsonContainer) ? (string)__jsonContainer : (string)Container;} + {_storageAccountName = If( json?.PropertyT("storageAccountName"), out var __jsonStorageAccountName) ? (string)__jsonStorageAccountName : (string)StorageAccountName;} + {_storageEncryptionFormat = If( json?.PropertyT("storageEncryptionFormat"), out var __jsonStorageEncryptionFormat) ? (string)__jsonStorageEncryptionFormat : (string)StorageEncryptionFormat;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._assetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._assetId.ToString()) : null, "assetId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._lastModified ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModified?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModified" ,container.Add ); + } + AddIf( null != (((object)this._alternateId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._alternateId.ToString()) : null, "alternateId" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != (((object)this._container)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._container.ToString()) : null, "container" ,container.Add ); + AddIf( null != (((object)this._storageAccountName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._storageAccountName.ToString()) : null, "storageAccountName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._storageEncryptionFormat)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._storageEncryptionFormat.ToString()) : null, "storageEncryptionFormat" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetStreamingLocator.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetStreamingLocator.cs new file mode 100644 index 000000000000..447e90eef3e9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetStreamingLocator.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the Streaming Locator. + public partial class AssetStreamingLocator : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocatorInternal + { + + /// Backing field for property. + private string _assetName; + + /// Asset Name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AssetName { get => this._assetName; } + + /// Backing field for property. + private global::System.DateTime? _created; + + /// The creation time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private string _defaultContentKeyPolicyName; + + /// Name of the default ContentKeyPolicy used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DefaultContentKeyPolicyName { get => this._defaultContentKeyPolicyName; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// The end time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; } + + /// Internal Acessors for AssetName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocatorInternal.AssetName { get => this._assetName; set { {_assetName = value;} } } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocatorInternal.Created { get => this._created; set { {_created = value;} } } + + /// Internal Acessors for DefaultContentKeyPolicyName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocatorInternal.DefaultContentKeyPolicyName { get => this._defaultContentKeyPolicyName; set { {_defaultContentKeyPolicyName = value;} } } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocatorInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocatorInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocatorInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for StreamingLocatorId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocatorInternal.StreamingLocatorId { get => this._streamingLocatorId; set { {_streamingLocatorId = value;} } } + + /// Internal Acessors for StreamingPolicyName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocatorInternal.StreamingPolicyName { get => this._streamingPolicyName; set { {_streamingPolicyName = value;} } } + + /// Backing field for property. + private string _name; + + /// Streaming Locator name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// The start time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; } + + /// Backing field for property. + private string _streamingLocatorId; + + /// StreamingLocatorId of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string StreamingLocatorId { get => this._streamingLocatorId; } + + /// Backing field for property. + private string _streamingPolicyName; + + /// Name of the Streaming Policy used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string StreamingPolicyName { get => this._streamingPolicyName; } + + /// Creates an new instance. + public AssetStreamingLocator() + { + + } + } + /// Properties of the Streaming Locator. + public partial interface IAssetStreamingLocator : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Asset Name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Asset Name.", + SerializedName = @"assetName", + PossibleTypes = new [] { typeof(string) })] + string AssetName { get; } + /// The creation time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation time of the Streaming Locator.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// Name of the default ContentKeyPolicy used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Name of the default ContentKeyPolicy used by this Streaming Locator.", + SerializedName = @"defaultContentKeyPolicyName", + PossibleTypes = new [] { typeof(string) })] + string DefaultContentKeyPolicyName { get; } + /// The end time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The end time of the Streaming Locator.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// Streaming Locator name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Streaming Locator name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The start time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The start time of the Streaming Locator.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// StreamingLocatorId of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"StreamingLocatorId of the Streaming Locator.", + SerializedName = @"streamingLocatorId", + PossibleTypes = new [] { typeof(string) })] + string StreamingLocatorId { get; } + /// Name of the Streaming Policy used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Name of the Streaming Policy used by this Streaming Locator.", + SerializedName = @"streamingPolicyName", + PossibleTypes = new [] { typeof(string) })] + string StreamingPolicyName { get; } + + } + /// Properties of the Streaming Locator. + internal partial interface IAssetStreamingLocatorInternal + + { + /// Asset Name. + string AssetName { get; set; } + /// The creation time of the Streaming Locator. + global::System.DateTime? Created { get; set; } + /// Name of the default ContentKeyPolicy used by this Streaming Locator. + string DefaultContentKeyPolicyName { get; set; } + /// The end time of the Streaming Locator. + global::System.DateTime? EndTime { get; set; } + /// Streaming Locator name. + string Name { get; set; } + /// The start time of the Streaming Locator. + global::System.DateTime? StartTime { get; set; } + /// StreamingLocatorId of the Streaming Locator. + string StreamingLocatorId { get; set; } + /// Name of the Streaming Policy used by this Streaming Locator. + string StreamingPolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetStreamingLocator.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetStreamingLocator.json.cs new file mode 100644 index 000000000000..87d69b17131c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetStreamingLocator.json.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the Streaming Locator. + public partial class AssetStreamingLocator + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetStreamingLocator(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_assetName = If( json?.PropertyT("assetName"), out var __jsonAssetName) ? (string)__jsonAssetName : (string)AssetName;} + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_streamingLocatorId = If( json?.PropertyT("streamingLocatorId"), out var __jsonStreamingLocatorId) ? (string)__jsonStreamingLocatorId : (string)StreamingLocatorId;} + {_streamingPolicyName = If( json?.PropertyT("streamingPolicyName"), out var __jsonStreamingPolicyName) ? (string)__jsonStreamingPolicyName : (string)StreamingPolicyName;} + {_defaultContentKeyPolicyName = If( json?.PropertyT("defaultContentKeyPolicyName"), out var __jsonDefaultContentKeyPolicyName) ? (string)__jsonDefaultContentKeyPolicyName : (string)DefaultContentKeyPolicyName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetStreamingLocator(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._assetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._assetName.ToString()) : null, "assetName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._streamingLocatorId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingLocatorId.ToString()) : null, "streamingLocatorId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._streamingPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingPolicyName.ToString()) : null, "streamingPolicyName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._defaultContentKeyPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._defaultContentKeyPolicyName.ToString()) : null, "defaultContentKeyPolicyName" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrack.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrack.cs new file mode 100644 index 000000000000..11dc0e695778 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrack.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An Asset Track resource. + public partial class AssetTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetTrackProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Track + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackInternal.Track { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal)Property).Track; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal)Property).Track = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackProperties _property; + + /// The resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetTrackProperties()); set => this._property = value; } + + /// Provisioning state of the asset track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal)Property).ProvisioningState; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string TrackOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal)Property).TrackOdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal)Property).TrackOdataType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public AssetTrack() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); + } + if (headers.TryGetValues("Location", out var __locationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader1) is string __headerLocationHeader1 ? __headerLocationHeader1 : (string)null; + } + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader2)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader2) is string __headerAzureAsyncOperationHeader2 ? __headerAzureAsyncOperationHeader2 : (string)null; + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// An Asset Track resource. + public partial interface IAssetTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Provisioning state of the asset track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning state of the asset track.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string TrackOdataType { get; set; } + + } + /// An Asset Track resource. + internal partial interface IAssetTrackInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + string AzureAsyncOperation { get; set; } + + string Location { get; set; } + /// The resource properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackProperties Property { get; set; } + /// Provisioning state of the asset track. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; set; } + + int? RetryAfter { get; set; } + /// Detailed information about a track in the asset. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase Track { get; set; } + /// The discriminator for derived types. + string TrackOdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrack.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrack.json.cs new file mode 100644 index 000000000000..bb08e3ba102d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrack.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// An Asset Track resource. + public partial class AssetTrack + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetTrack(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetTrackProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetTrack(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackCollection.cs new file mode 100644 index 000000000000..2535a45d1edf --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackCollection.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of AssetTrack items. + public partial class AssetTrackCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackCollectionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack[] _value; + + /// A collection of AssetTrack items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AssetTrackCollection() + { + + } + } + /// A collection of AssetTrack items. + public partial interface IAssetTrackCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// A collection of AssetTrack items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of AssetTrack items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack[] Value { get; set; } + + } + /// A collection of AssetTrack items. + internal partial interface IAssetTrackCollectionInternal + + { + /// A collection of AssetTrack items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackCollection.json.cs new file mode 100644 index 000000000000..e53d23391673 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackCollection.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of AssetTrack items. + public partial class AssetTrackCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetTrackCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrack) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetTrack.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetTrackCollection(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackOperationStatus.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackOperationStatus.cs new file mode 100644 index 000000000000..c22ccc87f760 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackOperationStatus.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Status of asset track operation. + public partial class AssetTrackOperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatus, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatusInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// Operation end time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail _error; + + /// The error detail. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail()); set => this._error = value; } + + /// Backing field for property. + private string _id; + + /// Operation resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatusInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatusInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatusInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target = value; } + + /// Backing field for property. + private string _name; + + /// Operation identifier. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Operation start time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private string _status; + + /// Operation status. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public AssetTrackOperationStatus() + { + + } + } + /// Status of asset track operation. + public partial interface IAssetTrackOperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; } + /// Operation end time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation end time.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// Operation resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// Operation identifier. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Operation identifier.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Operation start time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation start time.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// Operation status. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Operation status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Status of asset track operation. + internal partial interface IAssetTrackOperationStatusInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; set; } + /// Operation end time. + global::System.DateTime? EndTime { get; set; } + /// The error detail. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Error { get; set; } + /// Operation resource ID. + string Id { get; set; } + /// The error message. + string Message { get; set; } + /// Operation identifier. + string Name { get; set; } + /// Operation start time. + global::System.DateTime? StartTime { get; set; } + /// Operation status. + string Status { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackOperationStatus.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackOperationStatus.json.cs new file mode 100644 index 000000000000..9bd0b94a69bf --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackOperationStatus.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Status of asset track operation. + public partial class AssetTrackOperationStatus + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetTrackOperationStatus(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatus. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatus. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackOperationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetTrackOperationStatus(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackProperties.cs new file mode 100644 index 000000000000..088d4b5ee14e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackProperties.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of a video, audio or text track in the asset. + public partial class AssetTrackProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal + { + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Track + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackPropertiesInternal.Track { get => (this._track = this._track ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackBase()); set { {_track = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? _provisioningState; + + /// Provisioning state of the asset track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase _track; + + /// Detailed information about a track in the asset. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase Track { get => (this._track = this._track ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackBase()); set => this._track = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string TrackOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal)Track).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal)Track).OdataType = value ?? null; } + + /// Creates an new instance. + public AssetTrackProperties() + { + + } + } + /// Properties of a video, audio or text track in the asset. + public partial interface IAssetTrackProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Provisioning state of the asset track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning state of the asset track.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string TrackOdataType { get; set; } + + } + /// Properties of a video, audio or text track in the asset. + internal partial interface IAssetTrackPropertiesInternal + + { + /// Provisioning state of the asset track. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState? ProvisioningState { get; set; } + /// Detailed information about a track in the asset. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase Track { get; set; } + /// The discriminator for derived types. + string TrackOdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackProperties.json.cs new file mode 100644 index 000000000000..0dc2cd07762c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AssetTrackProperties.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of a video, audio or text track in the asset. + public partial class AssetTrackProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AssetTrackProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_track = If( json?.PropertyT("track"), out var __jsonTrack) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackBase.FromJson(__jsonTrack) : Track;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetTrackProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AssetTrackProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._track ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._track.ToJson(null,serializationMode) : null, "track" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AsyncOperationResult.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AsyncOperationResult.cs new file mode 100644 index 000000000000..f238a5cae70c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AsyncOperationResult.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The status of an async operation. + public partial class AsyncOperationResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResult, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResultInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail _error; + + /// The error object + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResultInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResultInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResultInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResultInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResultInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target = value; } + + /// Backing field for property. + private string _name; + + /// Operation Id of the async operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus? _status; + + /// Operation status of the async operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus? Status { get => this._status; set => this._status = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public AsyncOperationResult() + { + + } + } + /// The status of an async operation. + public partial interface IAsyncOperationResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// Operation Id of the async operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation Id of the async operation.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Operation status of the async operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation status of the async operation.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus? Status { get; set; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The status of an async operation. + internal partial interface IAsyncOperationResultInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail[] Detail { get; set; } + /// The error object + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// Operation Id of the async operation. + string Name { get; set; } + /// Operation status of the async operation. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus? Status { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AsyncOperationResult.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AsyncOperationResult.json.cs new file mode 100644 index 000000000000..4504c271584b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AsyncOperationResult.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The status of an async operation. + public partial class AsyncOperationResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AsyncOperationResult(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAsyncOperationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AsyncOperationResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AudioTrack.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AudioTrack.cs new file mode 100644 index 000000000000..841cdb9f38d7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AudioTrack.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents an audio track in the asset. + public partial class AudioTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAudioTrack, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAudioTrackInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase __trackBase = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackBase(); + + /// Backing field for property. + private int? _bitRate; + + /// The stream bit rate for the audio track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? BitRate { get => this._bitRate; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettings _dashSetting; + + /// The DASH specific setting for the audio track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettings DashSetting { get => (this._dashSetting = this._dashSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.DashSettings()); set => this._dashSetting = value; } + + /// The role for the DASH setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DashSettingRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettingsInternal)DashSetting).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettingsInternal)DashSetting).Role = value ?? null; } + + /// Backing field for property. + private string _displayName; + + /// + /// The display name of the audio track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _fileName; + + /// + /// The file name to the source file. This file is located in the storage container of the asset. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FileName { get => this._fileName; set => this._fileName = value; } + + /// The characteristics for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string HlSettingCharacteristic { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Characteristic; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Characteristic = value ?? null; } + + /// The default for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? HlSettingDefault { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Default; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Default = value ?? default(bool); } + + /// The forced for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? HlSettingForced { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Forced; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Forced = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings _hlsSetting; + + /// The HLS specific setting for the audio track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings HlsSetting { get => (this._hlsSetting = this._hlsSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.HlsSettings()); set => this._hlsSetting = value; } + + /// Backing field for property. + private string _languageCode; + + /// The RFC5646 language code for the audio track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string LanguageCode { get => this._languageCode; set => this._languageCode = value; } + + /// Internal Acessors for BitRate + int? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAudioTrackInternal.BitRate { get => this._bitRate; set { {_bitRate = value;} } } + + /// Internal Acessors for DashSetting + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettings Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAudioTrackInternal.DashSetting { get => (this._dashSetting = this._dashSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.DashSettings()); set { {_dashSetting = value;} } } + + /// Internal Acessors for HlsSetting + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAudioTrackInternal.HlsSetting { get => (this._hlsSetting = this._hlsSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.HlsSettings()); set { {_hlsSetting = value;} } } + + /// Backing field for property. + private int? _mpeg4TrackId; + + /// The MPEG-4 audio track ID for the audio track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? Mpeg4TrackId { get => this._mpeg4TrackId; set => this._mpeg4TrackId = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal)__trackBase).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal)__trackBase).OdataType = value ; } + + /// Creates an new instance. + public AudioTrack() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackBase), __trackBase); + await eventListener.AssertObjectIsValid(nameof(__trackBase), __trackBase); + } + } + /// Represents an audio track in the asset. + public partial interface IAudioTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase + { + /// The stream bit rate for the audio track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The stream bit rate for the audio track.", + SerializedName = @"bitRate", + PossibleTypes = new [] { typeof(int) })] + int? BitRate { get; } + /// The role for the DASH setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The role for the DASH setting.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(string) })] + string DashSettingRole { get; set; } + /// + /// The display name of the audio track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the audio track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The file name to the source file. This file is located in the storage container of the asset. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The file name to the source file. This file is located in the storage container of the asset.", + SerializedName = @"fileName", + PossibleTypes = new [] { typeof(string) })] + string FileName { get; set; } + /// The characteristics for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The characteristics for the HLS setting.", + SerializedName = @"characteristics", + PossibleTypes = new [] { typeof(string) })] + string HlSettingCharacteristic { get; set; } + /// The default for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default for the HLS setting.", + SerializedName = @"default", + PossibleTypes = new [] { typeof(bool) })] + bool? HlSettingDefault { get; set; } + /// The forced for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The forced for the HLS setting.", + SerializedName = @"forced", + PossibleTypes = new [] { typeof(bool) })] + bool? HlSettingForced { get; set; } + /// The RFC5646 language code for the audio track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The RFC5646 language code for the audio track.", + SerializedName = @"languageCode", + PossibleTypes = new [] { typeof(string) })] + string LanguageCode { get; set; } + /// The MPEG-4 audio track ID for the audio track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The MPEG-4 audio track ID for the audio track.", + SerializedName = @"mpeg4TrackId", + PossibleTypes = new [] { typeof(int) })] + int? Mpeg4TrackId { get; set; } + + } + /// Represents an audio track in the asset. + internal partial interface IAudioTrackInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal + { + /// The stream bit rate for the audio track. + int? BitRate { get; set; } + /// The DASH specific setting for the audio track. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettings DashSetting { get; set; } + /// The role for the DASH setting. + string DashSettingRole { get; set; } + /// + /// The display name of the audio track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA. + /// + string DisplayName { get; set; } + /// + /// The file name to the source file. This file is located in the storage container of the asset. + /// + string FileName { get; set; } + /// The characteristics for the HLS setting. + string HlSettingCharacteristic { get; set; } + /// The default for the HLS setting. + bool? HlSettingDefault { get; set; } + /// The forced for the HLS setting. + bool? HlSettingForced { get; set; } + /// The HLS specific setting for the audio track. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings HlsSetting { get; set; } + /// The RFC5646 language code for the audio track. + string LanguageCode { get; set; } + /// The MPEG-4 audio track ID for the audio track. + int? Mpeg4TrackId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/AudioTrack.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/AudioTrack.json.cs new file mode 100644 index 000000000000..ce00942c6632 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/AudioTrack.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents an audio track in the asset. + public partial class AudioTrack + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal AudioTrack(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackBase = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackBase(json); + {_hlsSetting = If( json?.PropertyT("hlsSettings"), out var __jsonHlsSettings) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.HlsSettings.FromJson(__jsonHlsSettings) : HlsSetting;} + {_dashSetting = If( json?.PropertyT("dashSettings"), out var __jsonDashSettings) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.DashSettings.FromJson(__jsonDashSettings) : DashSetting;} + {_fileName = If( json?.PropertyT("fileName"), out var __jsonFileName) ? (string)__jsonFileName : (string)FileName;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_languageCode = If( json?.PropertyT("languageCode"), out var __jsonLanguageCode) ? (string)__jsonLanguageCode : (string)LanguageCode;} + {_mpeg4TrackId = If( json?.PropertyT("mpeg4TrackId"), out var __jsonMpeg4TrackId) ? (int?)__jsonMpeg4TrackId : Mpeg4TrackId;} + {_bitRate = If( json?.PropertyT("bitRate"), out var __jsonBitRate) ? (int?)__jsonBitRate : BitRate;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAudioTrack. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAudioTrack. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAudioTrack FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new AudioTrack(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackBase?.ToJson(container, serializationMode); + AddIf( null != this._hlsSetting ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._hlsSetting.ToJson(null,serializationMode) : null, "hlsSettings" ,container.Add ); + AddIf( null != this._dashSetting ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._dashSetting.ToJson(null,serializationMode) : null, "dashSettings" ,container.Add ); + AddIf( null != (((object)this._fileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._fileName.ToString()) : null, "fileName" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._languageCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._languageCode.ToString()) : null, "languageCode" ,container.Add ); + AddIf( null != this._mpeg4TrackId ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._mpeg4TrackId) : null, "mpeg4TrackId" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._bitRate ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._bitRate) : null, "bitRate" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CbcsDrmConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CbcsDrmConfiguration.cs new file mode 100644 index 000000000000..a2e93826a6e8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CbcsDrmConfiguration.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Class to specify DRM configurations of CommonEncryptionCbcs scheme in Streaming Policy + /// + public partial class CbcsDrmConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration _fairPlay; + + /// FairPlay configurations + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration FairPlay { get => (this._fairPlay = this._fairPlay ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyFairPlayConfiguration()); set => this._fairPlay = value; } + + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? FairPlayAllowPersistentLicense { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfigurationInternal)FairPlay).AllowPersistentLicense; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfigurationInternal)FairPlay).AllowPersistentLicense = value ?? default(bool); } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string FairPlayCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfigurationInternal)FairPlay).CustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfigurationInternal)FairPlay).CustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Internal Acessors for FairPlay + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal.FairPlay { get => (this._fairPlay = this._fairPlay ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyFairPlayConfiguration()); set { {_fairPlay = value;} } } + + /// Internal Acessors for PlayReady + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal.PlayReady { get => (this._playReady = this._playReady ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyPlayReadyConfiguration()); set { {_playReady = value;} } } + + /// Internal Acessors for Widevine + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal.Widevine { get => (this._widevine = this._widevine ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyWidevineConfiguration()); set { {_widevine = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration _playReady; + + /// PlayReady configurations + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration PlayReady { get => (this._playReady = this._playReady ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyPlayReadyConfiguration()); set => this._playReady = value; } + + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PlayReadyCustomAttribute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfigurationInternal)PlayReady).PlayReadyCustomAttribute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfigurationInternal)PlayReady).PlayReadyCustomAttribute = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PlayReadyCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfigurationInternal)PlayReady).CustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfigurationInternal)PlayReady).CustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration _widevine; + + /// Widevine configurations + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Widevine { get => (this._widevine = this._widevine ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyWidevineConfiguration()); set => this._widevine = value; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string WidevineCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfigurationInternal)Widevine).CustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfigurationInternal)Widevine).CustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Creates an new instance. + public CbcsDrmConfiguration() + { + + } + } + /// Class to specify DRM configurations of CommonEncryptionCbcs scheme in Streaming Policy + public partial interface ICbcsDrmConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"All license to be persistent or not", + SerializedName = @"allowPersistentLicense", + PossibleTypes = new [] { typeof(bool) })] + bool? FairPlayAllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string FairPlayCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom attributes for PlayReady", + SerializedName = @"playReadyCustomAttributes", + PossibleTypes = new [] { typeof(string) })] + string PlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string PlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string WidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + + } + /// Class to specify DRM configurations of CommonEncryptionCbcs scheme in Streaming Policy + internal partial interface ICbcsDrmConfigurationInternal + + { + /// FairPlay configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration FairPlay { get; set; } + /// All license to be persistent or not + bool? FairPlayAllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string FairPlayCustomLicenseAcquisitionUrlTemplate { get; set; } + /// PlayReady configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration PlayReady { get; set; } + /// Custom attributes for PlayReady + string PlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string PlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Widevine configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Widevine { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string WidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CbcsDrmConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CbcsDrmConfiguration.json.cs new file mode 100644 index 000000000000..584abeb3ef4a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CbcsDrmConfiguration.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Class to specify DRM configurations of CommonEncryptionCbcs scheme in Streaming Policy + /// + public partial class CbcsDrmConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal CbcsDrmConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_fairPlay = If( json?.PropertyT("fairPlay"), out var __jsonFairPlay) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyFairPlayConfiguration.FromJson(__jsonFairPlay) : FairPlay;} + {_playReady = If( json?.PropertyT("playReady"), out var __jsonPlayReady) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyPlayReadyConfiguration.FromJson(__jsonPlayReady) : PlayReady;} + {_widevine = If( json?.PropertyT("widevine"), out var __jsonWidevine) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyWidevineConfiguration.FromJson(__jsonWidevine) : Widevine;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new CbcsDrmConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._fairPlay ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._fairPlay.ToJson(null,serializationMode) : null, "fairPlay" ,container.Add ); + AddIf( null != this._playReady ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._playReady.ToJson(null,serializationMode) : null, "playReady" ,container.Add ); + AddIf( null != this._widevine ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._widevine.ToJson(null,serializationMode) : null, "widevine" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CencDrmConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CencDrmConfiguration.cs new file mode 100644 index 000000000000..14ba43b6adc4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CencDrmConfiguration.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Class to specify DRM configurations of CommonEncryptionCenc scheme in Streaming Policy + /// + public partial class CencDrmConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal + { + + /// Internal Acessors for PlayReady + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal.PlayReady { get => (this._playReady = this._playReady ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyPlayReadyConfiguration()); set { {_playReady = value;} } } + + /// Internal Acessors for Widevine + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal.Widevine { get => (this._widevine = this._widevine ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyWidevineConfiguration()); set { {_widevine = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration _playReady; + + /// PlayReady configurations + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration PlayReady { get => (this._playReady = this._playReady ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyPlayReadyConfiguration()); set => this._playReady = value; } + + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PlayReadyCustomAttribute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfigurationInternal)PlayReady).PlayReadyCustomAttribute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfigurationInternal)PlayReady).PlayReadyCustomAttribute = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PlayReadyCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfigurationInternal)PlayReady).CustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfigurationInternal)PlayReady).CustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration _widevine; + + /// Widevine configurations + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Widevine { get => (this._widevine = this._widevine ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyWidevineConfiguration()); set => this._widevine = value; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string WidevineCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfigurationInternal)Widevine).CustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfigurationInternal)Widevine).CustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Creates an new instance. + public CencDrmConfiguration() + { + + } + } + /// Class to specify DRM configurations of CommonEncryptionCenc scheme in Streaming Policy + public partial interface ICencDrmConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom attributes for PlayReady", + SerializedName = @"playReadyCustomAttributes", + PossibleTypes = new [] { typeof(string) })] + string PlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string PlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string WidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + + } + /// Class to specify DRM configurations of CommonEncryptionCenc scheme in Streaming Policy + internal partial interface ICencDrmConfigurationInternal + + { + /// PlayReady configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration PlayReady { get; set; } + /// Custom attributes for PlayReady + string PlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string PlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Widevine configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Widevine { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string WidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CencDrmConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CencDrmConfiguration.json.cs new file mode 100644 index 000000000000..7e4d7179c5f5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CencDrmConfiguration.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Class to specify DRM configurations of CommonEncryptionCenc scheme in Streaming Policy + /// + public partial class CencDrmConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal CencDrmConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_playReady = If( json?.PropertyT("playReady"), out var __jsonPlayReady) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyPlayReadyConfiguration.FromJson(__jsonPlayReady) : PlayReady;} + {_widevine = If( json?.PropertyT("widevine"), out var __jsonWidevine) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyWidevineConfiguration.FromJson(__jsonWidevine) : Widevine;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new CencDrmConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._playReady ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._playReady.ToJson(null,serializationMode) : null, "playReady" ,container.Add ); + AddIf( null != this._widevine ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._widevine.ToJson(null,serializationMode) : null, "widevine" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ClearKeyEncryptionConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ClearKeyEncryptionConfiguration.cs new file mode 100644 index 000000000000..f158d7c41bcd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ClearKeyEncryptionConfiguration.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Class to specify ClearKey configuration of common encryption schemes in Streaming Policy + /// + public partial class ClearKeyEncryptionConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfigurationInternal + { + + /// Backing field for property. + private string _customKeysAcquisitionUrlTemplate; + + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CustomKeysAcquisitionUrlTemplate { get => this._customKeysAcquisitionUrlTemplate; set => this._customKeysAcquisitionUrlTemplate = value; } + + /// Creates an new instance. + public ClearKeyEncryptionConfiguration() + { + + } + } + /// Class to specify ClearKey configuration of common encryption schemes in Streaming Policy + public partial interface IClearKeyEncryptionConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId.", + SerializedName = @"customKeysAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CustomKeysAcquisitionUrlTemplate { get; set; } + + } + /// Class to specify ClearKey configuration of common encryption schemes in Streaming Policy + internal partial interface IClearKeyEncryptionConfigurationInternal + + { + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + string CustomKeysAcquisitionUrlTemplate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ClearKeyEncryptionConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ClearKeyEncryptionConfiguration.json.cs new file mode 100644 index 000000000000..9b2fb852aac4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ClearKeyEncryptionConfiguration.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Class to specify ClearKey configuration of common encryption schemes in Streaming Policy + /// + public partial class ClearKeyEncryptionConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ClearKeyEncryptionConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_customKeysAcquisitionUrlTemplate = If( json?.PropertyT("customKeysAcquisitionUrlTemplate"), out var __jsonCustomKeysAcquisitionUrlTemplate) ? (string)__jsonCustomKeysAcquisitionUrlTemplate : (string)CustomKeysAcquisitionUrlTemplate;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ClearKeyEncryptionConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._customKeysAcquisitionUrlTemplate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._customKeysAcquisitionUrlTemplate.ToString()) : null, "customKeysAcquisitionUrlTemplate" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCbcs.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCbcs.cs new file mode 100644 index 000000000000..c7e6342c848e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCbcs.cs @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for CommonEncryptionCbcs encryption scheme + public partial class CommonEncryptionCbcs : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration _clearKeyEncryptionConfiguration; + + /// + /// Optional configuration supporting ClearKey in CommonEncryptionCbcs encryption scheme. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration ClearKeyEncryptionConfiguration { get => (this._clearKeyEncryptionConfiguration = this._clearKeyEncryptionConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ClearKeyEncryptionConfiguration()); set => this._clearKeyEncryptionConfiguration = value; } + + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfigurationInternal)ClearKeyEncryptionConfiguration).CustomKeysAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfigurationInternal)ClearKeyEncryptionConfiguration).CustomKeysAcquisitionUrlTemplate = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] _clearTrack; + + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] ClearTrack { get => this._clearTrack; set => this._clearTrack = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys _contentKey; + + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys ContentKey { get => (this._contentKey = this._contentKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKeys()); set => this._contentKey = value; } + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] ContentKeyToTrackMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).KeyToTrackMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).KeyToTrackMapping = value ?? null /* arrayOf */; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyLabel = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyPolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration _drm; + + /// Configuration of DRMs for current encryption scheme + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration Drm { get => (this._drm = this._drm ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CbcsDrmConfiguration()); set => this._drm = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols _enabledProtocol; + + /// Representing supported protocols + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnabledProtocol { get => (this._enabledProtocol = this._enabledProtocol ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols()); set => this._enabledProtocol = value; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Dash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Dash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Download; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Download = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Hl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Hl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).SmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).SmoothStreaming = value ?? default(bool); } + + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? FairPlayAllowPersistentLicense { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).FairPlayAllowPersistentLicense; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).FairPlayAllowPersistentLicense = value ?? default(bool); } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string FairPlayCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).FairPlayCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).FairPlayCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Internal Acessors for ClearKeyEncryptionConfiguration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal.ClearKeyEncryptionConfiguration { get => (this._clearKeyEncryptionConfiguration = this._clearKeyEncryptionConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ClearKeyEncryptionConfiguration()); set { {_clearKeyEncryptionConfiguration = value;} } } + + /// Internal Acessors for ContentKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal.ContentKey { get => (this._contentKey = this._contentKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKeys()); set { {_contentKey = value;} } } + + /// Internal Acessors for ContentKeyDefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal.ContentKeyDefaultKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKey = value; } + + /// Internal Acessors for Drm + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal.Drm { get => (this._drm = this._drm ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CbcsDrmConfiguration()); set { {_drm = value;} } } + + /// Internal Acessors for DrmFairPlay + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal.DrmFairPlay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).FairPlay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).FairPlay = value; } + + /// Internal Acessors for DrmPlayReady + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal.DrmPlayReady { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).PlayReady; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).PlayReady = value; } + + /// Internal Acessors for DrmWidevine + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal.DrmWidevine { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).Widevine; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).Widevine = value; } + + /// Internal Acessors for EnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal.EnabledProtocol { get => (this._enabledProtocol = this._enabledProtocol ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols()); set { {_enabledProtocol = value;} } } + + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PlayReadyCustomAttribute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).PlayReadyCustomAttribute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).PlayReadyCustomAttribute = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PlayReadyCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).PlayReadyCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).PlayReadyCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string WidevineCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).WidevineCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfigurationInternal)Drm).WidevineCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Creates an new instance. + public CommonEncryptionCbcs() + { + + } + } + /// Class for CommonEncryptionCbcs encryption scheme + public partial interface ICommonEncryptionCbcs : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId.", + SerializedName = @"customKeysAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing which tracks should not be encrypted", + SerializedName = @"clearTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] ClearTrack { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] ContentKeyToTrackMapping { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string DefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string DefaultKeyPolicyName { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolSmoothStreaming { get; set; } + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"All license to be persistent or not", + SerializedName = @"allowPersistentLicense", + PossibleTypes = new [] { typeof(bool) })] + bool? FairPlayAllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string FairPlayCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom attributes for PlayReady", + SerializedName = @"playReadyCustomAttributes", + PossibleTypes = new [] { typeof(string) })] + string PlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string PlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string WidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + + } + /// Class for CommonEncryptionCbcs encryption scheme + internal partial interface ICommonEncryptionCbcsInternal + + { + /// + /// Optional configuration supporting ClearKey in CommonEncryptionCbcs encryption scheme. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration ClearKeyEncryptionConfiguration { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + string ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Representing which tracks should not be encrypted + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] ClearTrack { get; set; } + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys ContentKey { get; set; } + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey ContentKeyDefaultKey { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] ContentKeyToTrackMapping { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string DefaultKeyLabel { get; set; } + /// Policy used by Default Key + string DefaultKeyPolicyName { get; set; } + /// Configuration of DRMs for current encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration Drm { get; set; } + /// FairPlay configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration DrmFairPlay { get; set; } + /// PlayReady configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration DrmPlayReady { get; set; } + /// Widevine configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration DrmWidevine { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? EnabledProtocolDash { get; set; } + /// Enable Download protocol or not + bool? EnabledProtocolDownload { get; set; } + /// Enable HLS protocol or not + bool? EnabledProtocolHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? EnabledProtocolSmoothStreaming { get; set; } + /// All license to be persistent or not + bool? FairPlayAllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string FairPlayCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Custom attributes for PlayReady + string PlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string PlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string WidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCbcs.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCbcs.json.cs new file mode 100644 index 000000000000..968f3af0d976 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCbcs.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for CommonEncryptionCbcs encryption scheme + public partial class CommonEncryptionCbcs + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal CommonEncryptionCbcs(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabledProtocol = If( json?.PropertyT("enabledProtocols"), out var __jsonEnabledProtocols) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols.FromJson(__jsonEnabledProtocols) : EnabledProtocol;} + {_contentKey = If( json?.PropertyT("contentKeys"), out var __jsonContentKeys) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKeys.FromJson(__jsonContentKeys) : ContentKey;} + {_drm = If( json?.PropertyT("drm"), out var __jsonDrm) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CbcsDrmConfiguration.FromJson(__jsonDrm) : Drm;} + {_clearKeyEncryptionConfiguration = If( json?.PropertyT("clearKeyEncryptionConfiguration"), out var __jsonClearKeyEncryptionConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ClearKeyEncryptionConfiguration.FromJson(__jsonClearKeyEncryptionConfiguration) : ClearKeyEncryptionConfiguration;} + {_clearTrack = If( json?.PropertyT("clearTracks"), out var __jsonClearTracks) ? If( __jsonClearTracks as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackSelection.FromJson(__u) )) ))() : null : ClearTrack;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new CommonEncryptionCbcs(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enabledProtocol ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._enabledProtocol.ToJson(null,serializationMode) : null, "enabledProtocols" ,container.Add ); + AddIf( null != this._contentKey ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._contentKey.ToJson(null,serializationMode) : null, "contentKeys" ,container.Add ); + AddIf( null != this._drm ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._drm.ToJson(null,serializationMode) : null, "drm" ,container.Add ); + AddIf( null != this._clearKeyEncryptionConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._clearKeyEncryptionConfiguration.ToJson(null,serializationMode) : null, "clearKeyEncryptionConfiguration" ,container.Add ); + if (null != this._clearTrack) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._clearTrack ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("clearTracks",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCenc.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCenc.cs new file mode 100644 index 000000000000..51f8c711bc9e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCenc.cs @@ -0,0 +1,327 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for envelope encryption scheme + public partial class CommonEncryptionCenc : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration _clearKeyEncryptionConfiguration; + + /// + /// Optional configuration supporting ClearKey in CommonEncryptionCenc encryption scheme. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration ClearKeyEncryptionConfiguration { get => (this._clearKeyEncryptionConfiguration = this._clearKeyEncryptionConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ClearKeyEncryptionConfiguration()); set => this._clearKeyEncryptionConfiguration = value; } + + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfigurationInternal)ClearKeyEncryptionConfiguration).CustomKeysAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfigurationInternal)ClearKeyEncryptionConfiguration).CustomKeysAcquisitionUrlTemplate = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] _clearTrack; + + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] ClearTrack { get => this._clearTrack; set => this._clearTrack = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys _contentKey; + + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys ContentKey { get => (this._contentKey = this._contentKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKeys()); set => this._contentKey = value; } + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] ContentKeyToTrackMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).KeyToTrackMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).KeyToTrackMapping = value ?? null /* arrayOf */; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyLabel = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyPolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration _drm; + + /// Configuration of DRMs for CommonEncryptionCenc encryption scheme + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration Drm { get => (this._drm = this._drm ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CencDrmConfiguration()); set => this._drm = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols _enabledProtocol; + + /// Representing supported protocols + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnabledProtocol { get => (this._enabledProtocol = this._enabledProtocol ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols()); set => this._enabledProtocol = value; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Dash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Dash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Download; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Download = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Hl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Hl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).SmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).SmoothStreaming = value ?? default(bool); } + + /// Internal Acessors for ClearKeyEncryptionConfiguration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal.ClearKeyEncryptionConfiguration { get => (this._clearKeyEncryptionConfiguration = this._clearKeyEncryptionConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ClearKeyEncryptionConfiguration()); set { {_clearKeyEncryptionConfiguration = value;} } } + + /// Internal Acessors for ContentKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal.ContentKey { get => (this._contentKey = this._contentKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKeys()); set { {_contentKey = value;} } } + + /// Internal Acessors for ContentKeyDefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal.ContentKeyDefaultKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKey = value; } + + /// Internal Acessors for Drm + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal.Drm { get => (this._drm = this._drm ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CencDrmConfiguration()); set { {_drm = value;} } } + + /// Internal Acessors for DrmPlayReady + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal.DrmPlayReady { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).PlayReady; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).PlayReady = value; } + + /// Internal Acessors for DrmWidevine + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal.DrmWidevine { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).Widevine; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).Widevine = value; } + + /// Internal Acessors for EnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal.EnabledProtocol { get => (this._enabledProtocol = this._enabledProtocol ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols()); set { {_enabledProtocol = value;} } } + + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PlayReadyCustomAttribute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).PlayReadyCustomAttribute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).PlayReadyCustomAttribute = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PlayReadyCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).PlayReadyCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).PlayReadyCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string WidevineCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).WidevineCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfigurationInternal)Drm).WidevineCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Creates an new instance. + public CommonEncryptionCenc() + { + + } + } + /// Class for envelope encryption scheme + public partial interface ICommonEncryptionCenc : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId.", + SerializedName = @"customKeysAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing which tracks should not be encrypted", + SerializedName = @"clearTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] ClearTrack { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] ContentKeyToTrackMapping { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string DefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string DefaultKeyPolicyName { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolSmoothStreaming { get; set; } + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom attributes for PlayReady", + SerializedName = @"playReadyCustomAttributes", + PossibleTypes = new [] { typeof(string) })] + string PlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string PlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string WidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + + } + /// Class for envelope encryption scheme + internal partial interface ICommonEncryptionCencInternal + + { + /// + /// Optional configuration supporting ClearKey in CommonEncryptionCenc encryption scheme. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration ClearKeyEncryptionConfiguration { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + string ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Representing which tracks should not be encrypted + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] ClearTrack { get; set; } + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys ContentKey { get; set; } + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey ContentKeyDefaultKey { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] ContentKeyToTrackMapping { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string DefaultKeyLabel { get; set; } + /// Policy used by Default Key + string DefaultKeyPolicyName { get; set; } + /// Configuration of DRMs for CommonEncryptionCenc encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration Drm { get; set; } + /// PlayReady configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration DrmPlayReady { get; set; } + /// Widevine configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration DrmWidevine { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? EnabledProtocolDash { get; set; } + /// Enable Download protocol or not + bool? EnabledProtocolDownload { get; set; } + /// Enable HLS protocol or not + bool? EnabledProtocolHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? EnabledProtocolSmoothStreaming { get; set; } + /// Custom attributes for PlayReady + string PlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string PlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string WidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCenc.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCenc.json.cs new file mode 100644 index 000000000000..475dd739c647 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CommonEncryptionCenc.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for envelope encryption scheme + public partial class CommonEncryptionCenc + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal CommonEncryptionCenc(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabledProtocol = If( json?.PropertyT("enabledProtocols"), out var __jsonEnabledProtocols) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols.FromJson(__jsonEnabledProtocols) : EnabledProtocol;} + {_contentKey = If( json?.PropertyT("contentKeys"), out var __jsonContentKeys) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKeys.FromJson(__jsonContentKeys) : ContentKey;} + {_drm = If( json?.PropertyT("drm"), out var __jsonDrm) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CencDrmConfiguration.FromJson(__jsonDrm) : Drm;} + {_clearKeyEncryptionConfiguration = If( json?.PropertyT("clearKeyEncryptionConfiguration"), out var __jsonClearKeyEncryptionConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ClearKeyEncryptionConfiguration.FromJson(__jsonClearKeyEncryptionConfiguration) : ClearKeyEncryptionConfiguration;} + {_clearTrack = If( json?.PropertyT("clearTracks"), out var __jsonClearTracks) ? If( __jsonClearTracks as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackSelection.FromJson(__u) )) ))() : null : ClearTrack;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new CommonEncryptionCenc(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enabledProtocol ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._enabledProtocol.ToJson(null,serializationMode) : null, "enabledProtocols" ,container.Add ); + AddIf( null != this._contentKey ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._contentKey.ToJson(null,serializationMode) : null, "contentKeys" ,container.Add ); + AddIf( null != this._drm ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._drm.ToJson(null,serializationMode) : null, "drm" ,container.Add ); + AddIf( null != this._clearKeyEncryptionConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._clearKeyEncryptionConfiguration.ToJson(null,serializationMode) : null, "clearKeyEncryptionConfiguration" ,container.Add ); + if (null != this._clearTrack) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._clearTrack ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("clearTracks",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicy.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicy.cs new file mode 100644 index 000000000000..bcfa42ac988f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicy.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Content Key Policy resource. + public partial class ContentKeyPolicy : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// The creation date of the Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).Created; } + + /// A description for the Policy. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).Description = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// The last modified date of the Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).LastModified; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyInternal.Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).Created; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).Created = value; } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyInternal.LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).LastModified; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).LastModified = value; } + + /// Internal Acessors for PolicyId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyInternal.PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).PolicyId = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// The Key Policy options. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption[] Option { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).Option; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).Option = value ?? null /* arrayOf */; } + + /// The legacy Policy ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal)Property).PolicyId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyProperties _property; + + /// The properties of the Content Key Policy. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyProperties()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ContentKeyPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// A Content Key Policy resource. + public partial interface IContentKeyPolicy : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// The creation date of the Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation date of the Policy", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// A description for the Policy. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the Policy.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The last modified date of the Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The last modified date of the Policy", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// The Key Policy options. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Key Policy options.", + SerializedName = @"options", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption[] Option { get; set; } + /// The legacy Policy ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The legacy Policy ID.", + SerializedName = @"policyId", + PossibleTypes = new [] { typeof(string) })] + string PolicyId { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// A Content Key Policy resource. + internal partial interface IContentKeyPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// The creation date of the Policy + global::System.DateTime? Created { get; set; } + /// A description for the Policy. + string Description { get; set; } + /// The last modified date of the Policy + global::System.DateTime? LastModified { get; set; } + /// The Key Policy options. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption[] Option { get; set; } + /// The legacy Policy ID. + string PolicyId { get; set; } + /// The properties of the Content Key Policy. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyProperties Property { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicy.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicy.json.cs new file mode 100644 index 000000000000..1a94f8aa5917 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicy.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Content Key Policy resource. + public partial class ContentKeyPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicy(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicy(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyClearKeyConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyClearKeyConfiguration.cs new file mode 100644 index 000000000000..3598bd78dca8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyClearKeyConfiguration.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents a configuration for non-DRM keys. + public partial class ContentKeyPolicyClearKeyConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyClearKeyConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyClearKeyConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType = value ; } + + /// Creates an new instance. + public ContentKeyPolicyClearKeyConfiguration() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + } + } + /// Represents a configuration for non-DRM keys. + public partial interface IContentKeyPolicyClearKeyConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration + { + + } + /// Represents a configuration for non-DRM keys. + internal partial interface IContentKeyPolicyClearKeyConfigurationInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyClearKeyConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyClearKeyConfiguration.json.cs new file mode 100644 index 000000000000..c3d301d687a0 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyClearKeyConfiguration.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents a configuration for non-DRM keys. + public partial class ContentKeyPolicyClearKeyConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyClearKeyConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyClearKeyConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyClearKeyConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyClearKeyConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyClearKeyConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyConfiguration?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyCollection.cs new file mode 100644 index 000000000000..7ff495eeed83 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of ContentKeyPolicy items. + public partial class ContentKeyPolicyCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyCollectionInternal + { + + /// Backing field for property. + private string _odataNextLink; + + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy[] _value; + + /// A collection of ContentKeyPolicy items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ContentKeyPolicyCollection() + { + + } + } + /// A collection of ContentKeyPolicy items. + public partial interface IContentKeyPolicyCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A link to the next page of the collection (when the collection contains too many results to return in one response).", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// A collection of ContentKeyPolicy items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of ContentKeyPolicy items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy[] Value { get; set; } + + } + /// A collection of ContentKeyPolicy items. + internal partial interface IContentKeyPolicyCollectionInternal + + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + string OdataNextLink { get; set; } + /// A collection of ContentKeyPolicy items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyCollection.json.cs new file mode 100644 index 000000000000..eb67344c3aa2 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyCollection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of ContentKeyPolicy items. + public partial class ContentKeyPolicyCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicy) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicy.FromJson(__u) )) ))() : null : Value;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyCollection(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyConfiguration.cs new file mode 100644 index 000000000000..a09730f3a373 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyConfiguration.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for Content Key Policy configuration. A derived class must be used to create a configuration. + /// + public partial class ContentKeyPolicyConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal + { + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public ContentKeyPolicyConfiguration() + { + + } + } + /// Base class for Content Key Policy configuration. A derived class must be used to create a configuration. + public partial interface IContentKeyPolicyConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base class for Content Key Policy configuration. A derived class must be used to create a configuration. + internal partial interface IContentKeyPolicyConfigurationInternal + + { + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyConfiguration.json.cs new file mode 100644 index 000000000000..0740ff09a4b9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyConfiguration.json.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for Content Key Policy configuration. A derived class must be used to create a configuration. + /// + public partial class ContentKeyPolicyConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration": + { + return new ContentKeyPolicyClearKeyConfiguration(json); + } + case "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration": + { + return new ContentKeyPolicyUnknownConfiguration(json); + } + case "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration": + { + return new ContentKeyPolicyWidevineConfiguration(json); + } + case "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration": + { + return new ContentKeyPolicyPlayReadyConfiguration(json); + } + case "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration": + { + return new ContentKeyPolicyFairPlayConfiguration(json); + } + } + return new ContentKeyPolicyConfiguration(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayConfiguration.cs new file mode 100644 index 000000000000..a51636c2c6b7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayConfiguration.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a configuration for FairPlay licenses. + public partial class ContentKeyPolicyFairPlayConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(); + + /// Backing field for property. + private byte[] _ask; + + /// + /// The key that must be used as FairPlay Application Secret key. This needs to be base64 encoded. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public byte[] Ask { get => this._ask; set => this._ask = value; } + + /// Backing field for property. + private string _fairPlayPfx; + + /// + /// The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FairPlayPfx { get => this._fairPlayPfx; set => this._fairPlayPfx = value; } + + /// Backing field for property. + private string _fairPlayPfxPassword; + + /// The password encrypting FairPlay certificate in PKCS 12 (pfx) format. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FairPlayPfxPassword { get => this._fairPlayPfxPassword; set => this._fairPlayPfxPassword = value; } + + /// Internal Acessors for OfflineRentalConfiguration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayConfigurationInternal.OfflineRentalConfiguration { get => (this._offlineRentalConfiguration = this._offlineRentalConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyFairPlayOfflineRentalConfiguration()); set { {_offlineRentalConfiguration = value;} } } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfiguration _offlineRentalConfiguration; + + /// Offline rental policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfiguration OfflineRentalConfiguration { get => (this._offlineRentalConfiguration = this._offlineRentalConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyFairPlayOfflineRentalConfiguration()); set => this._offlineRentalConfiguration = value; } + + /// Playback duration + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? OfflineRentalConfigurationPlaybackDurationSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfigurationInternal)OfflineRentalConfiguration).PlaybackDurationSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfigurationInternal)OfflineRentalConfiguration).PlaybackDurationSecond = value ?? default(long); } + + /// Storage duration + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? OfflineRentalConfigurationStorageDurationSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfigurationInternal)OfflineRentalConfiguration).StorageDurationSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfigurationInternal)OfflineRentalConfiguration).StorageDurationSecond = value ?? default(long); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType _rentalAndLeaseKeyType; + + /// The rental and lease key type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType RentalAndLeaseKeyType { get => this._rentalAndLeaseKeyType; set => this._rentalAndLeaseKeyType = value; } + + /// Backing field for property. + private long _rentalDuration; + + /// The rental duration. Must be greater than or equal to 0. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long RentalDuration { get => this._rentalDuration; set => this._rentalDuration = value; } + + /// Creates an new instance. + public ContentKeyPolicyFairPlayConfiguration() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + } + } + /// Specifies a configuration for FairPlay licenses. + public partial interface IContentKeyPolicyFairPlayConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration + { + /// + /// The key that must be used as FairPlay Application Secret key. This needs to be base64 encoded. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The key that must be used as FairPlay Application Secret key. This needs to be base64 encoded.", + SerializedName = @"ask", + PossibleTypes = new [] { typeof(byte[]) })] + byte[] Ask { get; set; } + /// + /// The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).", + SerializedName = @"fairPlayPfx", + PossibleTypes = new [] { typeof(string) })] + string FairPlayPfx { get; set; } + /// The password encrypting FairPlay certificate in PKCS 12 (pfx) format. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The password encrypting FairPlay certificate in PKCS 12 (pfx) format.", + SerializedName = @"fairPlayPfxPassword", + PossibleTypes = new [] { typeof(string) })] + string FairPlayPfxPassword { get; set; } + /// Playback duration + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Playback duration", + SerializedName = @"playbackDurationSeconds", + PossibleTypes = new [] { typeof(long) })] + long? OfflineRentalConfigurationPlaybackDurationSecond { get; set; } + /// Storage duration + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage duration", + SerializedName = @"storageDurationSeconds", + PossibleTypes = new [] { typeof(long) })] + long? OfflineRentalConfigurationStorageDurationSecond { get; set; } + /// The rental and lease key type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rental and lease key type.", + SerializedName = @"rentalAndLeaseKeyType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType RentalAndLeaseKeyType { get; set; } + /// The rental duration. Must be greater than or equal to 0. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rental duration. Must be greater than or equal to 0.", + SerializedName = @"rentalDuration", + PossibleTypes = new [] { typeof(long) })] + long RentalDuration { get; set; } + + } + /// Specifies a configuration for FairPlay licenses. + internal partial interface IContentKeyPolicyFairPlayConfigurationInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal + { + /// + /// The key that must be used as FairPlay Application Secret key. This needs to be base64 encoded. + /// + byte[] Ask { get; set; } + /// + /// The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key). + /// + string FairPlayPfx { get; set; } + /// The password encrypting FairPlay certificate in PKCS 12 (pfx) format. + string FairPlayPfxPassword { get; set; } + /// Offline rental policy + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfiguration OfflineRentalConfiguration { get; set; } + /// Playback duration + long? OfflineRentalConfigurationPlaybackDurationSecond { get; set; } + /// Storage duration + long? OfflineRentalConfigurationStorageDurationSecond { get; set; } + /// The rental and lease key type. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType RentalAndLeaseKeyType { get; set; } + /// The rental duration. Must be greater than or equal to 0. + long RentalDuration { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayConfiguration.json.cs new file mode 100644 index 000000000000..f9066c621f96 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayConfiguration.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a configuration for FairPlay licenses. + public partial class ContentKeyPolicyFairPlayConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyFairPlayConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(json); + {_offlineRentalConfiguration = If( json?.PropertyT("offlineRentalConfiguration"), out var __jsonOfflineRentalConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyFairPlayOfflineRentalConfiguration.FromJson(__jsonOfflineRentalConfiguration) : OfflineRentalConfiguration;} + {_ask = If( json?.PropertyT("ask"), out var __w) ? System.Convert.FromBase64String( ((string)__w).Replace("_","/").Replace("-","+").PadRight( ((string)__w).Length + ((string)__w).Length * 3 % 4, '=') ) : null;} + {_fairPlayPfxPassword = If( json?.PropertyT("fairPlayPfxPassword"), out var __jsonFairPlayPfxPassword) ? (string)__jsonFairPlayPfxPassword : (string)FairPlayPfxPassword;} + {_fairPlayPfx = If( json?.PropertyT("fairPlayPfx"), out var __jsonFairPlayPfx) ? (string)__jsonFairPlayPfx : (string)FairPlayPfx;} + {_rentalAndLeaseKeyType = If( json?.PropertyT("rentalAndLeaseKeyType"), out var __jsonRentalAndLeaseKeyType) ? (string)__jsonRentalAndLeaseKeyType : (string)RentalAndLeaseKeyType;} + {_rentalDuration = If( json?.PropertyT("rentalDuration"), out var __jsonRentalDuration) ? (long)__jsonRentalDuration : RentalDuration;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyFairPlayConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyConfiguration?.ToJson(container, serializationMode); + AddIf( null != this._offlineRentalConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._offlineRentalConfiguration.ToJson(null,serializationMode) : null, "offlineRentalConfiguration" ,container.Add ); + AddIf( null != this._ask ? global::System.Convert.ToBase64String( this._ask) : null ,(v)=> container.Add( "ask",v) ); + AddIf( null != (((object)this._fairPlayPfxPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._fairPlayPfxPassword.ToString()) : null, "fairPlayPfxPassword" ,container.Add ); + AddIf( null != (((object)this._fairPlayPfx)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._fairPlayPfx.ToString()) : null, "fairPlayPfx" ,container.Add ); + AddIf( null != (((object)this._rentalAndLeaseKeyType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._rentalAndLeaseKeyType.ToString()) : null, "rentalAndLeaseKeyType" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._rentalDuration), "rentalDuration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayOfflineRentalConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayOfflineRentalConfiguration.cs new file mode 100644 index 000000000000..6201b92aff1d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayOfflineRentalConfiguration.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class ContentKeyPolicyFairPlayOfflineRentalConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfigurationInternal + { + + /// Backing field for property. + private long _playbackDurationSecond; + + /// Playback duration + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long PlaybackDurationSecond { get => this._playbackDurationSecond; set => this._playbackDurationSecond = value; } + + /// Backing field for property. + private long _storageDurationSecond; + + /// Storage duration + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long StorageDurationSecond { get => this._storageDurationSecond; set => this._storageDurationSecond = value; } + + /// + /// Creates an new instance. + /// + public ContentKeyPolicyFairPlayOfflineRentalConfiguration() + { + + } + } + public partial interface IContentKeyPolicyFairPlayOfflineRentalConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Playback duration + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Playback duration", + SerializedName = @"playbackDurationSeconds", + PossibleTypes = new [] { typeof(long) })] + long PlaybackDurationSecond { get; set; } + /// Storage duration + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Storage duration", + SerializedName = @"storageDurationSeconds", + PossibleTypes = new [] { typeof(long) })] + long StorageDurationSecond { get; set; } + + } + internal partial interface IContentKeyPolicyFairPlayOfflineRentalConfigurationInternal + + { + /// Playback duration + long PlaybackDurationSecond { get; set; } + /// Storage duration + long StorageDurationSecond { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayOfflineRentalConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayOfflineRentalConfiguration.json.cs new file mode 100644 index 000000000000..ebe152550a68 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyFairPlayOfflineRentalConfiguration.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class ContentKeyPolicyFairPlayOfflineRentalConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyFairPlayOfflineRentalConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_playbackDurationSecond = If( json?.PropertyT("playbackDurationSeconds"), out var __jsonPlaybackDurationSeconds) ? (long)__jsonPlaybackDurationSeconds : PlaybackDurationSecond;} + {_storageDurationSecond = If( json?.PropertyT("storageDurationSeconds"), out var __jsonStorageDurationSeconds) ? (long)__jsonStorageDurationSeconds : StorageDurationSecond;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyFairPlayOfflineRentalConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyFairPlayOfflineRentalConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._playbackDurationSecond), "playbackDurationSeconds" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._storageDurationSecond), "storageDurationSeconds" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOpenRestriction.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOpenRestriction.cs new file mode 100644 index 000000000000..56065ca81f65 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOpenRestriction.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents an open restriction. License or key will be delivered on every request. + /// + public partial class ContentKeyPolicyOpenRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOpenRestriction, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOpenRestrictionInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction __contentKeyPolicyRestriction = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestriction(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal)__contentKeyPolicyRestriction).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal)__contentKeyPolicyRestriction).OdataType = value ; } + + /// Creates an new instance. + public ContentKeyPolicyOpenRestriction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyRestriction), __contentKeyPolicyRestriction); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyRestriction), __contentKeyPolicyRestriction); + } + } + /// Represents an open restriction. License or key will be delivered on every request. + public partial interface IContentKeyPolicyOpenRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction + { + + } + /// Represents an open restriction. License or key will be delivered on every request. + internal partial interface IContentKeyPolicyOpenRestrictionInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOpenRestriction.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOpenRestriction.json.cs new file mode 100644 index 000000000000..9cdb7b943e21 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOpenRestriction.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents an open restriction. License or key will be delivered on every request. + /// + public partial class ContentKeyPolicyOpenRestriction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyOpenRestriction(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyRestriction = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestriction(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOpenRestriction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOpenRestriction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOpenRestriction FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyOpenRestriction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyRestriction?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOption.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOption.cs new file mode 100644 index 000000000000..cf90b5b7084f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOption.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents a policy option. + public partial class ContentKeyPolicyOption : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOptionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration _configuration; + + /// The key delivery configuration. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration Configuration { get => (this._configuration = this._configuration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration()); set => this._configuration = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string ConfigurationOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)Configuration).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)Configuration).OdataType = value ; } + + /// Internal Acessors for Configuration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOptionInternal.Configuration { get => (this._configuration = this._configuration ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration()); set { {_configuration = value;} } } + + /// Internal Acessors for PolicyOptionId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOptionInternal.PolicyOptionId { get => this._policyOptionId; set { {_policyOptionId = value;} } } + + /// Internal Acessors for Restriction + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOptionInternal.Restriction { get => (this._restriction = this._restriction ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestriction()); set { {_restriction = value;} } } + + /// Backing field for property. + private string _name; + + /// The Policy Option description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _policyOptionId; + + /// The legacy Policy Option ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PolicyOptionId { get => this._policyOptionId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction _restriction; + + /// The requirements that must be met to deliver keys with this configuration + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction Restriction { get => (this._restriction = this._restriction ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestriction()); set => this._restriction = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string RestrictionOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal)Restriction).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal)Restriction).OdataType = value ; } + + /// Creates an new instance. + public ContentKeyPolicyOption() + { + + } + } + /// Represents a policy option. + public partial interface IContentKeyPolicyOption : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string ConfigurationOdataType { get; set; } + /// The Policy Option description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Policy Option description.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The legacy Policy Option ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The legacy Policy Option ID.", + SerializedName = @"policyOptionId", + PossibleTypes = new [] { typeof(string) })] + string PolicyOptionId { get; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string RestrictionOdataType { get; set; } + + } + /// Represents a policy option. + internal partial interface IContentKeyPolicyOptionInternal + + { + /// The key delivery configuration. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration Configuration { get; set; } + /// The discriminator for derived types. + string ConfigurationOdataType { get; set; } + /// The Policy Option description. + string Name { get; set; } + /// The legacy Policy Option ID. + string PolicyOptionId { get; set; } + /// The requirements that must be met to deliver keys with this configuration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction Restriction { get; set; } + /// The discriminator for derived types. + string RestrictionOdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOption.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOption.json.cs new file mode 100644 index 000000000000..867e886809d3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyOption.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents a policy option. + public partial class ContentKeyPolicyOption + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyOption(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_configuration = If( json?.PropertyT("configuration"), out var __jsonConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration.FromJson(__jsonConfiguration) : Configuration;} + {_restriction = If( json?.PropertyT("restriction"), out var __jsonRestriction) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestriction.FromJson(__jsonRestriction) : Restriction;} + {_policyOptionId = If( json?.PropertyT("policyOptionId"), out var __jsonPolicyOptionId) ? (string)__jsonPolicyOptionId : (string)PolicyOptionId;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyOption(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._configuration ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._configuration.ToJson(null,serializationMode) : null, "configuration" ,container.Add ); + AddIf( null != this._restriction ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._restriction.ToJson(null,serializationMode) : null, "restriction" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._policyOptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._policyOptionId.ToString()) : null, "policyOptionId" ,container.Add ); + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyConfiguration.cs new file mode 100644 index 000000000000..74f93f558a87 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyConfiguration.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a configuration for PlayReady licenses. + public partial class ContentKeyPolicyPlayReadyConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense[] _license; + + /// The PlayReady licenses. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense[] License { get => this._license; set => this._license = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType = value ; } + + /// Backing field for property. + private string _responseCustomData; + + /// The custom response data. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ResponseCustomData { get => this._responseCustomData; set => this._responseCustomData = value; } + + /// Creates an new instance. + public ContentKeyPolicyPlayReadyConfiguration() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + } + } + /// Specifies a configuration for PlayReady licenses. + public partial interface IContentKeyPolicyPlayReadyConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration + { + /// The PlayReady licenses. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PlayReady licenses.", + SerializedName = @"licenses", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense[] License { get; set; } + /// The custom response data. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The custom response data.", + SerializedName = @"responseCustomData", + PossibleTypes = new [] { typeof(string) })] + string ResponseCustomData { get; set; } + + } + /// Specifies a configuration for PlayReady licenses. + internal partial interface IContentKeyPolicyPlayReadyConfigurationInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal + { + /// The PlayReady licenses. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense[] License { get; set; } + /// The custom response data. + string ResponseCustomData { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyConfiguration.json.cs new file mode 100644 index 000000000000..56d3bad64bda --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyConfiguration.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a configuration for PlayReady licenses. + public partial class ContentKeyPolicyPlayReadyConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyPlayReadyConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(json); + {_license = If( json?.PropertyT("licenses"), out var __jsonLicenses) ? If( __jsonLicenses as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyLicense.FromJson(__u) )) ))() : null : License;} + {_responseCustomData = If( json?.PropertyT("responseCustomData"), out var __jsonResponseCustomData) ? (string)__jsonResponseCustomData : (string)ResponseCustomData;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyPlayReadyConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyConfiguration?.ToJson(container, serializationMode); + if (null != this._license) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._license ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("licenses",__w); + } + AddIf( null != (((object)this._responseCustomData)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._responseCustomData.ToString()) : null, "responseCustomData" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.cs new file mode 100644 index 000000000000..ddade7435253 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies that the content key ID is in the PlayReady header. + public partial class ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromHeaderInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation __contentKeyPolicyPlayReadyContentKeyLocation = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyContentKeyLocation(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocationInternal)__contentKeyPolicyPlayReadyContentKeyLocation).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocationInternal)__contentKeyPolicyPlayReadyContentKeyLocation).OdataType = value ; } + + /// + /// Creates an new instance. + /// + public ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyPlayReadyContentKeyLocation), __contentKeyPolicyPlayReadyContentKeyLocation); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyPlayReadyContentKeyLocation), __contentKeyPolicyPlayReadyContentKeyLocation); + } + } + /// Specifies that the content key ID is in the PlayReady header. + public partial interface IContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation + { + + } + /// Specifies that the content key ID is in the PlayReady header. + internal partial interface IContentKeyPolicyPlayReadyContentEncryptionKeyFromHeaderInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocationInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.json.cs new file mode 100644 index 000000000000..8089d64a1afc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies that the content key ID is in the PlayReady header. + public partial class ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyPlayReadyContentKeyLocation = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyContentKeyLocation(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyPlayReadyContentKeyLocation?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.cs new file mode 100644 index 000000000000..25cd2f27e875 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies that the content key ID is specified in the PlayReady configuration. + public partial class ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifierInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation __contentKeyPolicyPlayReadyContentKeyLocation = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyContentKeyLocation(); + + /// Backing field for property. + private string _keyId; + + /// The content key ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string KeyId { get => this._keyId; set => this._keyId = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocationInternal)__contentKeyPolicyPlayReadyContentKeyLocation).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocationInternal)__contentKeyPolicyPlayReadyContentKeyLocation).OdataType = value ; } + + /// + /// Creates an new instance. + /// + public ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyPlayReadyContentKeyLocation), __contentKeyPolicyPlayReadyContentKeyLocation); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyPlayReadyContentKeyLocation), __contentKeyPolicyPlayReadyContentKeyLocation); + } + } + /// Specifies that the content key ID is specified in the PlayReady configuration. + public partial interface IContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation + { + /// The content key ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The content key ID.", + SerializedName = @"keyId", + PossibleTypes = new [] { typeof(string) })] + string KeyId { get; set; } + + } + /// Specifies that the content key ID is specified in the PlayReady configuration. + internal partial interface IContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifierInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocationInternal + { + /// The content key ID. + string KeyId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.json.cs new file mode 100644 index 000000000000..7d19c95ddd06 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies that the content key ID is specified in the PlayReady configuration. + public partial class ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyPlayReadyContentKeyLocation = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyContentKeyLocation(json); + {_keyId = If( json?.PropertyT("keyId"), out var __jsonKeyId) ? (string)__jsonKeyId : (string)KeyId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyPlayReadyContentKeyLocation?.ToJson(container, serializationMode); + AddIf( null != (((object)this._keyId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._keyId.ToString()) : null, "keyId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentKeyLocation.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentKeyLocation.cs new file mode 100644 index 000000000000..641a31dcbc8c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentKeyLocation.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for content key ID location. A derived class must be used to represent the location. + /// + public partial class ContentKeyPolicyPlayReadyContentKeyLocation : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocationInternal + { + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// + /// Creates an new instance. + /// + public ContentKeyPolicyPlayReadyContentKeyLocation() + { + + } + } + /// Base class for content key ID location. A derived class must be used to represent the location. + public partial interface IContentKeyPolicyPlayReadyContentKeyLocation : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base class for content key ID location. A derived class must be used to represent the location. + internal partial interface IContentKeyPolicyPlayReadyContentKeyLocationInternal + + { + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentKeyLocation.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentKeyLocation.json.cs new file mode 100644 index 000000000000..19ddd610ce77 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyContentKeyLocation.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for content key ID location. A derived class must be used to represent the location. + /// + public partial class ContentKeyPolicyPlayReadyContentKeyLocation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyPlayReadyContentKeyLocation(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader": + { + return new ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader(json); + } + case "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier": + { + return new ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier(json); + } + } + return new ContentKeyPolicyPlayReadyContentKeyLocation(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.cs new file mode 100644 index 000000000000..6f71d0030fb5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance + /// Rules. + /// + public partial class ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionInternal + { + + /// Backing field for property. + private bool _bestEffort; + + /// Indicates whether this restriction is enforced on a Best Effort basis. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool BestEffort { get => this._bestEffort; set => this._bestEffort = value; } + + /// Backing field for property. + private int _configurationData; + + /// Configures the restriction control bits. Must be between 0 and 3 inclusive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int ConfigurationData { get => this._configurationData; set => this._configurationData = value; } + + /// + /// Creates an new instance. + /// + public ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction() + { + + } + } + /// Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance + /// Rules. + public partial interface IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Indicates whether this restriction is enforced on a Best Effort basis. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates whether this restriction is enforced on a Best Effort basis.", + SerializedName = @"bestEffort", + PossibleTypes = new [] { typeof(bool) })] + bool BestEffort { get; set; } + /// Configures the restriction control bits. Must be between 0 and 3 inclusive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Configures the restriction control bits. Must be between 0 and 3 inclusive.", + SerializedName = @"configurationData", + PossibleTypes = new [] { typeof(int) })] + int ConfigurationData { get; set; } + + } + /// Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance + /// Rules. + internal partial interface IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionInternal + + { + /// Indicates whether this restriction is enforced on a Best Effort basis. + bool BestEffort { get; set; } + /// Configures the restriction control bits. Must be between 0 and 3 inclusive. + int ConfigurationData { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.json.cs new file mode 100644 index 000000000000..5cc313623498 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance + /// Rules. + /// + public partial class ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_bestEffort = If( json?.PropertyT("bestEffort"), out var __jsonBestEffort) ? (bool)__jsonBestEffort : BestEffort;} + {_configurationData = If( json?.PropertyT("configurationData"), out var __jsonConfigurationData) ? (int)__jsonConfigurationData : ConfigurationData;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._bestEffort), "bestEffort" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._configurationData), "configurationData" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyLicense.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyLicense.cs new file mode 100644 index 000000000000..b4527bea502b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyLicense.cs @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The PlayReady license + public partial class ContentKeyPolicyPlayReadyLicense : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicenseInternal + { + + /// Backing field for property. + private bool _allowTestDevice; + + /// A flag indicating whether test devices can use the license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool AllowTestDevice { get => this._allowTestDevice; set => this._allowTestDevice = value; } + + /// Backing field for property. + private global::System.DateTime? _beginDate; + + /// The begin date of license + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? BeginDate { get => this._beginDate; set => this._beginDate = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation _contentKeyLocation; + + /// The content key location. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation ContentKeyLocation { get => (this._contentKeyLocation = this._contentKeyLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyContentKeyLocation()); set => this._contentKeyLocation = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string ContentKeyLocationOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocationInternal)ContentKeyLocation).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocationInternal)ContentKeyLocation).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType _contentType; + + /// The PlayReady content type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType ContentType { get => this._contentType; set => this._contentType = value; } + + /// Backing field for property. + private global::System.DateTime? _expirationDate; + + /// The expiration date of license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? ExpirationDate { get => this._expirationDate; set => this._expirationDate = value; } + + /// Indicates whether this restriction is enforced on a Best Effort basis. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? ExplicitAnalogTelevisionOutputRestrictionBestEffort { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ExplicitAnalogTelevisionOutputRestrictionBestEffort; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ExplicitAnalogTelevisionOutputRestrictionBestEffort = value ?? default(bool); } + + /// Configures the restriction control bits. Must be between 0 and 3 inclusive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? ExplicitAnalogTelevisionOutputRestrictionConfigurationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ExplicitAnalogTelevisionOutputRestrictionConfigurationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ExplicitAnalogTelevisionOutputRestrictionConfigurationData = value ?? default(int); } + + /// Backing field for property. + private global::System.TimeSpan? _gracePeriod; + + /// The grace period of license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? GracePeriod { get => this._gracePeriod; set => this._gracePeriod = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType _licenseType; + + /// The license type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType LicenseType { get => this._licenseType; set => this._licenseType = value; } + + /// Internal Acessors for ContentKeyLocation + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicenseInternal.ContentKeyLocation { get => (this._contentKeyLocation = this._contentKeyLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyContentKeyLocation()); set { {_contentKeyLocation = value;} } } + + /// Internal Acessors for PlayRight + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRight Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicenseInternal.PlayRight { get => (this._playRight = this._playRight ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyPlayRight()); set { {_playRight = value;} } } + + /// Internal Acessors for PlayRightExplicitAnalogTelevisionOutputRestriction + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicenseInternal.PlayRightExplicitAnalogTelevisionOutputRestriction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ExplicitAnalogTelevisionOutputRestriction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ExplicitAnalogTelevisionOutputRestriction = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRight _playRight; + + /// The license PlayRight + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRight PlayRight { get => (this._playRight = this._playRight ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyPlayRight()); set => this._playRight = value; } + + /// + /// Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? PlayRightAgcAndColorStripeRestriction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).AgcAndColorStripeRestriction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).AgcAndColorStripeRestriction = value ?? default(int); } + + /// Configures Unknown output handling settings of the license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption? PlayRightAllowPassingVideoContentToUnknownOutput { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).AllowPassingVideoContentToUnknownOutput; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).AllowPassingVideoContentToUnknownOutput = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption)""); } + + /// Specifies the output protection level for compressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? PlayRightAnalogVideoOpl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).AnalogVideoOpl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).AnalogVideoOpl = value ?? default(int); } + + /// Specifies the output protection level for compressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? PlayRightCompressedDigitalAudioOpl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).CompressedDigitalAudioOpl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).CompressedDigitalAudioOpl = value ?? default(int); } + + /// Specifies the output protection level for compressed digital video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? PlayRightCompressedDigitalVideoOpl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).CompressedDigitalVideoOpl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).CompressedDigitalVideoOpl = value ?? default(int); } + + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? PlayRightDigitalVideoOnlyContentRestriction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).DigitalVideoOnlyContentRestriction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).DigitalVideoOnlyContentRestriction = value ?? default(bool); } + + /// + /// The amount of time that the license is valid after the license is first used to play content. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.TimeSpan? PlayRightFirstPlayExpiration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).FirstPlayExpiration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).FirstPlayExpiration = value ?? default(global::System.TimeSpan); } + + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? PlayRightImageConstraintForAnalogComponentVideoRestriction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ImageConstraintForAnalogComponentVideoRestriction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ImageConstraintForAnalogComponentVideoRestriction = value ?? default(bool); } + + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? PlayRightImageConstraintForAnalogComputerMonitorRestriction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ImageConstraintForAnalogComputerMonitorRestriction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ImageConstraintForAnalogComputerMonitorRestriction = value ?? default(bool); } + + /// + /// Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? PlayRightScmsRestriction { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ScmsRestriction; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).ScmsRestriction = value ?? default(int); } + + /// Specifies the output protection level for uncompressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? PlayRightUncompressedDigitalAudioOpl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).UncompressedDigitalAudioOpl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).UncompressedDigitalAudioOpl = value ?? default(int); } + + /// Specifies the output protection level for uncompressed digital video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? PlayRightUncompressedDigitalVideoOpl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).UncompressedDigitalVideoOpl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal)PlayRight).UncompressedDigitalVideoOpl = value ?? default(int); } + + /// Backing field for property. + private global::System.TimeSpan? _relativeBeginDate; + + /// The relative begin date of license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? RelativeBeginDate { get => this._relativeBeginDate; set => this._relativeBeginDate = value; } + + /// Backing field for property. + private global::System.TimeSpan? _relativeExpirationDate; + + /// The relative expiration date of license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? RelativeExpirationDate { get => this._relativeExpirationDate; set => this._relativeExpirationDate = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel? _securityLevel; + + /// The security level. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel? SecurityLevel { get => this._securityLevel; set => this._securityLevel = value; } + + /// Creates an new instance. + public ContentKeyPolicyPlayReadyLicense() + { + + } + } + /// The PlayReady license + public partial interface IContentKeyPolicyPlayReadyLicense : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// A flag indicating whether test devices can use the license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A flag indicating whether test devices can use the license.", + SerializedName = @"allowTestDevices", + PossibleTypes = new [] { typeof(bool) })] + bool AllowTestDevice { get; set; } + /// The begin date of license + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The begin date of license", + SerializedName = @"beginDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? BeginDate { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string ContentKeyLocationOdataType { get; set; } + /// The PlayReady content type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PlayReady content type.", + SerializedName = @"contentType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType ContentType { get; set; } + /// The expiration date of license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The expiration date of license.", + SerializedName = @"expirationDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExpirationDate { get; set; } + /// Indicates whether this restriction is enforced on a Best Effort basis. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether this restriction is enforced on a Best Effort basis.", + SerializedName = @"bestEffort", + PossibleTypes = new [] { typeof(bool) })] + bool? ExplicitAnalogTelevisionOutputRestrictionBestEffort { get; set; } + /// Configures the restriction control bits. Must be between 0 and 3 inclusive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Configures the restriction control bits. Must be between 0 and 3 inclusive.", + SerializedName = @"configurationData", + PossibleTypes = new [] { typeof(int) })] + int? ExplicitAnalogTelevisionOutputRestrictionConfigurationData { get; set; } + /// The grace period of license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The grace period of license.", + SerializedName = @"gracePeriod", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? GracePeriod { get; set; } + /// The license type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The license type.", + SerializedName = @"licenseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType LicenseType { get; set; } + /// + /// Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.", + SerializedName = @"agcAndColorStripeRestriction", + PossibleTypes = new [] { typeof(int) })] + int? PlayRightAgcAndColorStripeRestriction { get; set; } + /// Configures Unknown output handling settings of the license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Configures Unknown output handling settings of the license.", + SerializedName = @"allowPassingVideoContentToUnknownOutput", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption? PlayRightAllowPassingVideoContentToUnknownOutput { get; set; } + /// Specifies the output protection level for compressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for compressed digital audio.", + SerializedName = @"analogVideoOpl", + PossibleTypes = new [] { typeof(int) })] + int? PlayRightAnalogVideoOpl { get; set; } + /// Specifies the output protection level for compressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for compressed digital audio.", + SerializedName = @"compressedDigitalAudioOpl", + PossibleTypes = new [] { typeof(int) })] + int? PlayRightCompressedDigitalAudioOpl { get; set; } + /// Specifies the output protection level for compressed digital video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for compressed digital video.", + SerializedName = @"compressedDigitalVideoOpl", + PossibleTypes = new [] { typeof(int) })] + int? PlayRightCompressedDigitalVideoOpl { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the Image Constraint For Analog Component Video Restriction in the license.", + SerializedName = @"digitalVideoOnlyContentRestriction", + PossibleTypes = new [] { typeof(bool) })] + bool? PlayRightDigitalVideoOnlyContentRestriction { get; set; } + /// + /// The amount of time that the license is valid after the license is first used to play content. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The amount of time that the license is valid after the license is first used to play content.", + SerializedName = @"firstPlayExpiration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? PlayRightFirstPlayExpiration { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the Image Constraint For Analog Component Video Restriction in the license.", + SerializedName = @"imageConstraintForAnalogComponentVideoRestriction", + PossibleTypes = new [] { typeof(bool) })] + bool? PlayRightImageConstraintForAnalogComponentVideoRestriction { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the Image Constraint For Analog Component Video Restriction in the license.", + SerializedName = @"imageConstraintForAnalogComputerMonitorRestriction", + PossibleTypes = new [] { typeof(bool) })] + bool? PlayRightImageConstraintForAnalogComputerMonitorRestriction { get; set; } + /// + /// Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.", + SerializedName = @"scmsRestriction", + PossibleTypes = new [] { typeof(int) })] + int? PlayRightScmsRestriction { get; set; } + /// Specifies the output protection level for uncompressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for uncompressed digital audio.", + SerializedName = @"uncompressedDigitalAudioOpl", + PossibleTypes = new [] { typeof(int) })] + int? PlayRightUncompressedDigitalAudioOpl { get; set; } + /// Specifies the output protection level for uncompressed digital video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for uncompressed digital video.", + SerializedName = @"uncompressedDigitalVideoOpl", + PossibleTypes = new [] { typeof(int) })] + int? PlayRightUncompressedDigitalVideoOpl { get; set; } + /// The relative begin date of license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative begin date of license.", + SerializedName = @"relativeBeginDate", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? RelativeBeginDate { get; set; } + /// The relative expiration date of license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative expiration date of license.", + SerializedName = @"relativeExpirationDate", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? RelativeExpirationDate { get; set; } + /// The security level. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The security level.", + SerializedName = @"securityLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel? SecurityLevel { get; set; } + + } + /// The PlayReady license + internal partial interface IContentKeyPolicyPlayReadyLicenseInternal + + { + /// A flag indicating whether test devices can use the license. + bool AllowTestDevice { get; set; } + /// The begin date of license + global::System.DateTime? BeginDate { get; set; } + /// The content key location. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyContentKeyLocation ContentKeyLocation { get; set; } + /// The discriminator for derived types. + string ContentKeyLocationOdataType { get; set; } + /// The PlayReady content type. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType ContentType { get; set; } + /// The expiration date of license. + global::System.DateTime? ExpirationDate { get; set; } + /// Indicates whether this restriction is enforced on a Best Effort basis. + bool? ExplicitAnalogTelevisionOutputRestrictionBestEffort { get; set; } + /// Configures the restriction control bits. Must be between 0 and 3 inclusive. + int? ExplicitAnalogTelevisionOutputRestrictionConfigurationData { get; set; } + /// The grace period of license. + global::System.TimeSpan? GracePeriod { get; set; } + /// The license type. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType LicenseType { get; set; } + /// The license PlayRight + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRight PlayRight { get; set; } + /// + /// Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive. + /// + int? PlayRightAgcAndColorStripeRestriction { get; set; } + /// Configures Unknown output handling settings of the license. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption? PlayRightAllowPassingVideoContentToUnknownOutput { get; set; } + /// Specifies the output protection level for compressed digital audio. + int? PlayRightAnalogVideoOpl { get; set; } + /// Specifies the output protection level for compressed digital audio. + int? PlayRightCompressedDigitalAudioOpl { get; set; } + /// Specifies the output protection level for compressed digital video. + int? PlayRightCompressedDigitalVideoOpl { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + bool? PlayRightDigitalVideoOnlyContentRestriction { get; set; } + /// + /// Configures the Explicit Analog Television Output Restriction in the license. Configuration data must be between 0 and + /// 3 inclusive. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction PlayRightExplicitAnalogTelevisionOutputRestriction { get; set; } + /// + /// The amount of time that the license is valid after the license is first used to play content. + /// + global::System.TimeSpan? PlayRightFirstPlayExpiration { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + bool? PlayRightImageConstraintForAnalogComponentVideoRestriction { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + bool? PlayRightImageConstraintForAnalogComputerMonitorRestriction { get; set; } + /// + /// Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive. + /// + int? PlayRightScmsRestriction { get; set; } + /// Specifies the output protection level for uncompressed digital audio. + int? PlayRightUncompressedDigitalAudioOpl { get; set; } + /// Specifies the output protection level for uncompressed digital video. + int? PlayRightUncompressedDigitalVideoOpl { get; set; } + /// The relative begin date of license. + global::System.TimeSpan? RelativeBeginDate { get; set; } + /// The relative expiration date of license. + global::System.TimeSpan? RelativeExpirationDate { get; set; } + /// The security level. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel? SecurityLevel { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyLicense.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyLicense.json.cs new file mode 100644 index 000000000000..206e1b8a365a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyLicense.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The PlayReady license + public partial class ContentKeyPolicyPlayReadyLicense + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyPlayReadyLicense(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_playRight = If( json?.PropertyT("playRight"), out var __jsonPlayRight) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyPlayRight.FromJson(__jsonPlayRight) : PlayRight;} + {_contentKeyLocation = If( json?.PropertyT("contentKeyLocation"), out var __jsonContentKeyLocation) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyContentKeyLocation.FromJson(__jsonContentKeyLocation) : ContentKeyLocation;} + {_allowTestDevice = If( json?.PropertyT("allowTestDevices"), out var __jsonAllowTestDevices) ? (bool)__jsonAllowTestDevices : AllowTestDevice;} + {_securityLevel = If( json?.PropertyT("securityLevel"), out var __jsonSecurityLevel) ? (string)__jsonSecurityLevel : (string)SecurityLevel;} + {_beginDate = If( json?.PropertyT("beginDate"), out var __jsonBeginDate) ? global::System.DateTime.TryParse((string)__jsonBeginDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonBeginDateValue) ? __jsonBeginDateValue : BeginDate : BeginDate;} + {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? global::System.DateTime.TryParse((string)__jsonExpirationDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpirationDateValue) ? __jsonExpirationDateValue : ExpirationDate : ExpirationDate;} + {_relativeBeginDate = If( json?.PropertyT("relativeBeginDate"), out var __jsonRelativeBeginDate) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonRelativeBeginDate ) : RelativeBeginDate;} + {_relativeExpirationDate = If( json?.PropertyT("relativeExpirationDate"), out var __jsonRelativeExpirationDate) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonRelativeExpirationDate ) : RelativeExpirationDate;} + {_gracePeriod = If( json?.PropertyT("gracePeriod"), out var __jsonGracePeriod) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonGracePeriod ) : GracePeriod;} + {_licenseType = If( json?.PropertyT("licenseType"), out var __jsonLicenseType) ? (string)__jsonLicenseType : (string)LicenseType;} + {_contentType = If( json?.PropertyT("contentType"), out var __jsonContentType) ? (string)__jsonContentType : (string)ContentType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyLicense FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyPlayReadyLicense(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._playRight ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._playRight.ToJson(null,serializationMode) : null, "playRight" ,container.Add ); + AddIf( null != this._contentKeyLocation ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._contentKeyLocation.ToJson(null,serializationMode) : null, "contentKeyLocation" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._allowTestDevice), "allowTestDevices" ,container.Add ); + AddIf( null != (((object)this._securityLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._securityLevel.ToString()) : null, "securityLevel" ,container.Add ); + AddIf( null != this._beginDate ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._beginDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "beginDate" ,container.Add ); + AddIf( null != this._expirationDate ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._expirationDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expirationDate" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._relativeBeginDate ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._relativeBeginDate)): null), "relativeBeginDate" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._relativeExpirationDate ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._relativeExpirationDate)): null), "relativeExpirationDate" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._gracePeriod ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._gracePeriod)): null), "gracePeriod" ,container.Add ); + AddIf( null != (((object)this._licenseType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._licenseType.ToString()) : null, "licenseType" ,container.Add ); + AddIf( null != (((object)this._contentType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._contentType.ToString()) : null, "contentType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyPlayRight.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyPlayRight.cs new file mode 100644 index 000000000000..f37360edf377 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyPlayRight.cs @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Configures the Play Right in the PlayReady license. + public partial class ContentKeyPolicyPlayReadyPlayRight : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRight, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal + { + + /// Backing field for property. + private int? _agcAndColorStripeRestriction; + + /// + /// Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? AgcAndColorStripeRestriction { get => this._agcAndColorStripeRestriction; set => this._agcAndColorStripeRestriction = value; } + + /// + /// Backing field for property. + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption _allowPassingVideoContentToUnknownOutput; + + /// Configures Unknown output handling settings of the license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption AllowPassingVideoContentToUnknownOutput { get => this._allowPassingVideoContentToUnknownOutput; set => this._allowPassingVideoContentToUnknownOutput = value; } + + /// Backing field for property. + private int? _analogVideoOpl; + + /// Specifies the output protection level for compressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? AnalogVideoOpl { get => this._analogVideoOpl; set => this._analogVideoOpl = value; } + + /// Backing field for property. + private int? _compressedDigitalAudioOpl; + + /// Specifies the output protection level for compressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? CompressedDigitalAudioOpl { get => this._compressedDigitalAudioOpl; set => this._compressedDigitalAudioOpl = value; } + + /// Backing field for property. + private int? _compressedDigitalVideoOpl; + + /// Specifies the output protection level for compressed digital video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? CompressedDigitalVideoOpl { get => this._compressedDigitalVideoOpl; set => this._compressedDigitalVideoOpl = value; } + + /// Backing field for property. + private bool _digitalVideoOnlyContentRestriction; + + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool DigitalVideoOnlyContentRestriction { get => this._digitalVideoOnlyContentRestriction; set => this._digitalVideoOnlyContentRestriction = value; } + + /// + /// Backing field for property. + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction _explicitAnalogTelevisionOutputRestriction; + + /// + /// Configures the Explicit Analog Television Output Restriction in the license. Configuration data must be between 0 and + /// 3 inclusive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction ExplicitAnalogTelevisionOutputRestriction { get => (this._explicitAnalogTelevisionOutputRestriction = this._explicitAnalogTelevisionOutputRestriction ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction()); set => this._explicitAnalogTelevisionOutputRestriction = value; } + + /// Indicates whether this restriction is enforced on a Best Effort basis. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? ExplicitAnalogTelevisionOutputRestrictionBestEffort { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionInternal)ExplicitAnalogTelevisionOutputRestriction).BestEffort; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionInternal)ExplicitAnalogTelevisionOutputRestriction).BestEffort = value ?? default(bool); } + + /// Configures the restriction control bits. Must be between 0 and 3 inclusive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? ExplicitAnalogTelevisionOutputRestrictionConfigurationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionInternal)ExplicitAnalogTelevisionOutputRestriction).ConfigurationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionInternal)ExplicitAnalogTelevisionOutputRestriction).ConfigurationData = value ?? default(int); } + + /// Backing field for property. + private global::System.TimeSpan? _firstPlayExpiration; + + /// + /// The amount of time that the license is valid after the license is first used to play content. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? FirstPlayExpiration { get => this._firstPlayExpiration; set => this._firstPlayExpiration = value; } + + /// + /// Backing field for property. + /// + private bool _imageConstraintForAnalogComponentVideoRestriction; + + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool ImageConstraintForAnalogComponentVideoRestriction { get => this._imageConstraintForAnalogComponentVideoRestriction; set => this._imageConstraintForAnalogComponentVideoRestriction = value; } + + /// + /// Backing field for property. + /// + private bool _imageConstraintForAnalogComputerMonitorRestriction; + + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool ImageConstraintForAnalogComputerMonitorRestriction { get => this._imageConstraintForAnalogComputerMonitorRestriction; set => this._imageConstraintForAnalogComputerMonitorRestriction = value; } + + /// Internal Acessors for ExplicitAnalogTelevisionOutputRestriction + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRightInternal.ExplicitAnalogTelevisionOutputRestriction { get => (this._explicitAnalogTelevisionOutputRestriction = this._explicitAnalogTelevisionOutputRestriction ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction()); set { {_explicitAnalogTelevisionOutputRestriction = value;} } } + + /// Backing field for property. + private int? _scmsRestriction; + + /// + /// Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? ScmsRestriction { get => this._scmsRestriction; set => this._scmsRestriction = value; } + + /// Backing field for property. + private int? _uncompressedDigitalAudioOpl; + + /// Specifies the output protection level for uncompressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? UncompressedDigitalAudioOpl { get => this._uncompressedDigitalAudioOpl; set => this._uncompressedDigitalAudioOpl = value; } + + /// Backing field for property. + private int? _uncompressedDigitalVideoOpl; + + /// Specifies the output protection level for uncompressed digital video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? UncompressedDigitalVideoOpl { get => this._uncompressedDigitalVideoOpl; set => this._uncompressedDigitalVideoOpl = value; } + + /// Creates an new instance. + public ContentKeyPolicyPlayReadyPlayRight() + { + + } + } + /// Configures the Play Right in the PlayReady license. + public partial interface IContentKeyPolicyPlayReadyPlayRight : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.", + SerializedName = @"agcAndColorStripeRestriction", + PossibleTypes = new [] { typeof(int) })] + int? AgcAndColorStripeRestriction { get; set; } + /// Configures Unknown output handling settings of the license. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Configures Unknown output handling settings of the license.", + SerializedName = @"allowPassingVideoContentToUnknownOutput", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption AllowPassingVideoContentToUnknownOutput { get; set; } + /// Specifies the output protection level for compressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for compressed digital audio.", + SerializedName = @"analogVideoOpl", + PossibleTypes = new [] { typeof(int) })] + int? AnalogVideoOpl { get; set; } + /// Specifies the output protection level for compressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for compressed digital audio.", + SerializedName = @"compressedDigitalAudioOpl", + PossibleTypes = new [] { typeof(int) })] + int? CompressedDigitalAudioOpl { get; set; } + /// Specifies the output protection level for compressed digital video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for compressed digital video.", + SerializedName = @"compressedDigitalVideoOpl", + PossibleTypes = new [] { typeof(int) })] + int? CompressedDigitalVideoOpl { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enables the Image Constraint For Analog Component Video Restriction in the license.", + SerializedName = @"digitalVideoOnlyContentRestriction", + PossibleTypes = new [] { typeof(bool) })] + bool DigitalVideoOnlyContentRestriction { get; set; } + /// Indicates whether this restriction is enforced on a Best Effort basis. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether this restriction is enforced on a Best Effort basis.", + SerializedName = @"bestEffort", + PossibleTypes = new [] { typeof(bool) })] + bool? ExplicitAnalogTelevisionOutputRestrictionBestEffort { get; set; } + /// Configures the restriction control bits. Must be between 0 and 3 inclusive. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Configures the restriction control bits. Must be between 0 and 3 inclusive.", + SerializedName = @"configurationData", + PossibleTypes = new [] { typeof(int) })] + int? ExplicitAnalogTelevisionOutputRestrictionConfigurationData { get; set; } + /// + /// The amount of time that the license is valid after the license is first used to play content. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The amount of time that the license is valid after the license is first used to play content.", + SerializedName = @"firstPlayExpiration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? FirstPlayExpiration { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enables the Image Constraint For Analog Component Video Restriction in the license.", + SerializedName = @"imageConstraintForAnalogComponentVideoRestriction", + PossibleTypes = new [] { typeof(bool) })] + bool ImageConstraintForAnalogComponentVideoRestriction { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enables the Image Constraint For Analog Component Video Restriction in the license.", + SerializedName = @"imageConstraintForAnalogComputerMonitorRestriction", + PossibleTypes = new [] { typeof(bool) })] + bool ImageConstraintForAnalogComputerMonitorRestriction { get; set; } + /// + /// Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.", + SerializedName = @"scmsRestriction", + PossibleTypes = new [] { typeof(int) })] + int? ScmsRestriction { get; set; } + /// Specifies the output protection level for uncompressed digital audio. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for uncompressed digital audio.", + SerializedName = @"uncompressedDigitalAudioOpl", + PossibleTypes = new [] { typeof(int) })] + int? UncompressedDigitalAudioOpl { get; set; } + /// Specifies the output protection level for uncompressed digital video. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the output protection level for uncompressed digital video.", + SerializedName = @"uncompressedDigitalVideoOpl", + PossibleTypes = new [] { typeof(int) })] + int? UncompressedDigitalVideoOpl { get; set; } + + } + /// Configures the Play Right in the PlayReady license. + internal partial interface IContentKeyPolicyPlayReadyPlayRightInternal + + { + /// + /// Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive. + /// + int? AgcAndColorStripeRestriction { get; set; } + /// Configures Unknown output handling settings of the license. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption AllowPassingVideoContentToUnknownOutput { get; set; } + /// Specifies the output protection level for compressed digital audio. + int? AnalogVideoOpl { get; set; } + /// Specifies the output protection level for compressed digital audio. + int? CompressedDigitalAudioOpl { get; set; } + /// Specifies the output protection level for compressed digital video. + int? CompressedDigitalVideoOpl { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + bool DigitalVideoOnlyContentRestriction { get; set; } + /// + /// Configures the Explicit Analog Television Output Restriction in the license. Configuration data must be between 0 and + /// 3 inclusive. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction ExplicitAnalogTelevisionOutputRestriction { get; set; } + /// Indicates whether this restriction is enforced on a Best Effort basis. + bool? ExplicitAnalogTelevisionOutputRestrictionBestEffort { get; set; } + /// Configures the restriction control bits. Must be between 0 and 3 inclusive. + int? ExplicitAnalogTelevisionOutputRestrictionConfigurationData { get; set; } + /// + /// The amount of time that the license is valid after the license is first used to play content. + /// + global::System.TimeSpan? FirstPlayExpiration { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + bool ImageConstraintForAnalogComponentVideoRestriction { get; set; } + /// + /// Enables the Image Constraint For Analog Component Video Restriction in the license. + /// + bool ImageConstraintForAnalogComputerMonitorRestriction { get; set; } + /// + /// Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive. + /// + int? ScmsRestriction { get; set; } + /// Specifies the output protection level for uncompressed digital audio. + int? UncompressedDigitalAudioOpl { get; set; } + /// Specifies the output protection level for uncompressed digital video. + int? UncompressedDigitalVideoOpl { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyPlayRight.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyPlayRight.json.cs new file mode 100644 index 000000000000..6d377bf44523 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyPlayReadyPlayRight.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Configures the Play Right in the PlayReady license. + public partial class ContentKeyPolicyPlayReadyPlayRight + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyPlayReadyPlayRight(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_explicitAnalogTelevisionOutputRestriction = If( json?.PropertyT("explicitAnalogTelevisionOutputRestriction"), out var __jsonExplicitAnalogTelevisionOutputRestriction) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.FromJson(__jsonExplicitAnalogTelevisionOutputRestriction) : ExplicitAnalogTelevisionOutputRestriction;} + {_firstPlayExpiration = If( json?.PropertyT("firstPlayExpiration"), out var __jsonFirstPlayExpiration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonFirstPlayExpiration ) : FirstPlayExpiration;} + {_scmsRestriction = If( json?.PropertyT("scmsRestriction"), out var __jsonScmsRestriction) ? (int?)__jsonScmsRestriction : ScmsRestriction;} + {_agcAndColorStripeRestriction = If( json?.PropertyT("agcAndColorStripeRestriction"), out var __jsonAgcAndColorStripeRestriction) ? (int?)__jsonAgcAndColorStripeRestriction : AgcAndColorStripeRestriction;} + {_digitalVideoOnlyContentRestriction = If( json?.PropertyT("digitalVideoOnlyContentRestriction"), out var __jsonDigitalVideoOnlyContentRestriction) ? (bool)__jsonDigitalVideoOnlyContentRestriction : DigitalVideoOnlyContentRestriction;} + {_imageConstraintForAnalogComponentVideoRestriction = If( json?.PropertyT("imageConstraintForAnalogComponentVideoRestriction"), out var __jsonImageConstraintForAnalogComponentVideoRestriction) ? (bool)__jsonImageConstraintForAnalogComponentVideoRestriction : ImageConstraintForAnalogComponentVideoRestriction;} + {_imageConstraintForAnalogComputerMonitorRestriction = If( json?.PropertyT("imageConstraintForAnalogComputerMonitorRestriction"), out var __jsonImageConstraintForAnalogComputerMonitorRestriction) ? (bool)__jsonImageConstraintForAnalogComputerMonitorRestriction : ImageConstraintForAnalogComputerMonitorRestriction;} + {_allowPassingVideoContentToUnknownOutput = If( json?.PropertyT("allowPassingVideoContentToUnknownOutput"), out var __jsonAllowPassingVideoContentToUnknownOutput) ? (string)__jsonAllowPassingVideoContentToUnknownOutput : (string)AllowPassingVideoContentToUnknownOutput;} + {_uncompressedDigitalVideoOpl = If( json?.PropertyT("uncompressedDigitalVideoOpl"), out var __jsonUncompressedDigitalVideoOpl) ? (int?)__jsonUncompressedDigitalVideoOpl : UncompressedDigitalVideoOpl;} + {_compressedDigitalVideoOpl = If( json?.PropertyT("compressedDigitalVideoOpl"), out var __jsonCompressedDigitalVideoOpl) ? (int?)__jsonCompressedDigitalVideoOpl : CompressedDigitalVideoOpl;} + {_analogVideoOpl = If( json?.PropertyT("analogVideoOpl"), out var __jsonAnalogVideoOpl) ? (int?)__jsonAnalogVideoOpl : AnalogVideoOpl;} + {_compressedDigitalAudioOpl = If( json?.PropertyT("compressedDigitalAudioOpl"), out var __jsonCompressedDigitalAudioOpl) ? (int?)__jsonCompressedDigitalAudioOpl : CompressedDigitalAudioOpl;} + {_uncompressedDigitalAudioOpl = If( json?.PropertyT("uncompressedDigitalAudioOpl"), out var __jsonUncompressedDigitalAudioOpl) ? (int?)__jsonUncompressedDigitalAudioOpl : UncompressedDigitalAudioOpl;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRight. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRight. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPlayReadyPlayRight FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyPlayReadyPlayRight(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._explicitAnalogTelevisionOutputRestriction ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._explicitAnalogTelevisionOutputRestriction.ToJson(null,serializationMode) : null, "explicitAnalogTelevisionOutputRestriction" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._firstPlayExpiration ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._firstPlayExpiration)): null), "firstPlayExpiration" ,container.Add ); + AddIf( null != this._scmsRestriction ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._scmsRestriction) : null, "scmsRestriction" ,container.Add ); + AddIf( null != this._agcAndColorStripeRestriction ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._agcAndColorStripeRestriction) : null, "agcAndColorStripeRestriction" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._digitalVideoOnlyContentRestriction), "digitalVideoOnlyContentRestriction" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._imageConstraintForAnalogComponentVideoRestriction), "imageConstraintForAnalogComponentVideoRestriction" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._imageConstraintForAnalogComputerMonitorRestriction), "imageConstraintForAnalogComputerMonitorRestriction" ,container.Add ); + AddIf( null != (((object)this._allowPassingVideoContentToUnknownOutput)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._allowPassingVideoContentToUnknownOutput.ToString()) : null, "allowPassingVideoContentToUnknownOutput" ,container.Add ); + AddIf( null != this._uncompressedDigitalVideoOpl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._uncompressedDigitalVideoOpl) : null, "uncompressedDigitalVideoOpl" ,container.Add ); + AddIf( null != this._compressedDigitalVideoOpl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._compressedDigitalVideoOpl) : null, "compressedDigitalVideoOpl" ,container.Add ); + AddIf( null != this._analogVideoOpl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._analogVideoOpl) : null, "analogVideoOpl" ,container.Add ); + AddIf( null != this._compressedDigitalAudioOpl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._compressedDigitalAudioOpl) : null, "compressedDigitalAudioOpl" ,container.Add ); + AddIf( null != this._uncompressedDigitalAudioOpl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._uncompressedDigitalAudioOpl) : null, "uncompressedDigitalAudioOpl" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyProperties.cs new file mode 100644 index 000000000000..00546fd0cba9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyProperties.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The properties of the Content Key Policy. + public partial class ContentKeyPolicyProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal + { + + /// Backing field for property. + private global::System.DateTime? _created; + + /// The creation date of the Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private string _description; + + /// A description for the Policy. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModified; + + /// The last modified date of the Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? LastModified { get => this._lastModified; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal.Created { get => this._created; set { {_created = value;} } } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal.LastModified { get => this._lastModified; set { {_lastModified = value;} } } + + /// Internal Acessors for PolicyId + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyPropertiesInternal.PolicyId { get => this._policyId; set { {_policyId = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption[] _option; + + /// The Key Policy options. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption[] Option { get => this._option; set => this._option = value; } + + /// Backing field for property. + private string _policyId; + + /// The legacy Policy ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PolicyId { get => this._policyId; } + + /// Creates an new instance. + public ContentKeyPolicyProperties() + { + + } + } + /// The properties of the Content Key Policy. + public partial interface IContentKeyPolicyProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The creation date of the Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation date of the Policy", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// A description for the Policy. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the Policy.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The last modified date of the Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The last modified date of the Policy", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// The Key Policy options. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Key Policy options.", + SerializedName = @"options", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption[] Option { get; set; } + /// The legacy Policy ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The legacy Policy ID.", + SerializedName = @"policyId", + PossibleTypes = new [] { typeof(string) })] + string PolicyId { get; } + + } + /// The properties of the Content Key Policy. + internal partial interface IContentKeyPolicyPropertiesInternal + + { + /// The creation date of the Policy + global::System.DateTime? Created { get; set; } + /// A description for the Policy. + string Description { get; set; } + /// The last modified date of the Policy + global::System.DateTime? LastModified { get; set; } + /// The Key Policy options. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption[] Option { get; set; } + /// The legacy Policy ID. + string PolicyId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyProperties.json.cs new file mode 100644 index 000000000000..4536bf4addc2 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyProperties.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The properties of the Content Key Policy. + public partial class ContentKeyPolicyProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_policyId = If( json?.PropertyT("policyId"), out var __jsonPolicyId) ? (string)__jsonPolicyId : (string)PolicyId;} + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_lastModified = If( json?.PropertyT("lastModified"), out var __jsonLastModified) ? global::System.DateTime.TryParse((string)__jsonLastModified, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedValue) ? __jsonLastModifiedValue : LastModified : LastModified;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_option = If( json?.PropertyT("options"), out var __jsonOptions) ? If( __jsonOptions as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyOption) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyOption.FromJson(__u) )) ))() : null : Option;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._policyId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._policyId.ToString()) : null, "policyId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._lastModified ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModified?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModified" ,container.Add ); + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (null != this._option) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._option ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("options",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestriction.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestriction.cs new file mode 100644 index 000000000000..d951f13c9ba4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestriction.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for Content Key Policy restrictions. A derived class must be used to create a restriction. + /// + public partial class ContentKeyPolicyRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal + { + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public ContentKeyPolicyRestriction() + { + + } + } + /// Base class for Content Key Policy restrictions. A derived class must be used to create a restriction. + public partial interface IContentKeyPolicyRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base class for Content Key Policy restrictions. A derived class must be used to create a restriction. + internal partial interface IContentKeyPolicyRestrictionInternal + + { + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestriction.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestriction.json.cs new file mode 100644 index 000000000000..aa8d1938d30f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestriction.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for Content Key Policy restrictions. A derived class must be used to create a restriction. + /// + public partial class ContentKeyPolicyRestriction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyRestriction(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction interface is + /// polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.ContentKeyPolicyOpenRestriction": + { + return new ContentKeyPolicyOpenRestriction(json); + } + case "#Microsoft.Media.ContentKeyPolicyUnknownRestriction": + { + return new ContentKeyPolicyUnknownRestriction(json); + } + case "#Microsoft.Media.ContentKeyPolicyTokenRestriction": + { + return new ContentKeyPolicyTokenRestriction(json); + } + } + return new ContentKeyPolicyRestriction(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestrictionTokenKey.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestrictionTokenKey.cs new file mode 100644 index 000000000000..2947cb84ca42 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestrictionTokenKey.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for Content Key Policy key for token validation. A derived class must be used to create a token key. + /// + public partial class ContentKeyPolicyRestrictionTokenKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal + { + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public ContentKeyPolicyRestrictionTokenKey() + { + + } + } + /// Base class for Content Key Policy key for token validation. A derived class must be used to create a token key. + public partial interface IContentKeyPolicyRestrictionTokenKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base class for Content Key Policy key for token validation. A derived class must be used to create a token key. + internal partial interface IContentKeyPolicyRestrictionTokenKeyInternal + + { + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestrictionTokenKey.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestrictionTokenKey.json.cs new file mode 100644 index 000000000000..af48fe31d4ca --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRestrictionTokenKey.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base class for Content Key Policy key for token validation. A derived class must be used to create a token key. + /// + public partial class ContentKeyPolicyRestrictionTokenKey + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyRestrictionTokenKey(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey": + { + return new ContentKeyPolicySymmetricTokenKey(json); + } + case "#Microsoft.Media.ContentKeyPolicyRsaTokenKey": + { + return new ContentKeyPolicyRsaTokenKey(json); + } + case "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey": + { + return new ContentKeyPolicyX509CertificateTokenKey(json); + } + } + return new ContentKeyPolicyRestrictionTokenKey(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRsaTokenKey.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRsaTokenKey.cs new file mode 100644 index 000000000000..abb3d68f9d41 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRsaTokenKey.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a RSA key for token validation + public partial class ContentKeyPolicyRsaTokenKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRsaTokenKey, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRsaTokenKeyInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey __contentKeyPolicyRestrictionTokenKey = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey(); + + /// Backing field for property. + private byte[] _exponent; + + /// The RSA Parameter exponent + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public byte[] Exponent { get => this._exponent; set => this._exponent = value; } + + /// Backing field for property. + private byte[] _modulu; + + /// The RSA Parameter modulus + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public byte[] Modulu { get => this._modulu; set => this._modulu = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal)__contentKeyPolicyRestrictionTokenKey).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal)__contentKeyPolicyRestrictionTokenKey).OdataType = value ; } + + /// Creates an new instance. + public ContentKeyPolicyRsaTokenKey() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyRestrictionTokenKey), __contentKeyPolicyRestrictionTokenKey); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyRestrictionTokenKey), __contentKeyPolicyRestrictionTokenKey); + } + } + /// Specifies a RSA key for token validation + public partial interface IContentKeyPolicyRsaTokenKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey + { + /// The RSA Parameter exponent + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The RSA Parameter exponent", + SerializedName = @"exponent", + PossibleTypes = new [] { typeof(byte[]) })] + byte[] Exponent { get; set; } + /// The RSA Parameter modulus + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The RSA Parameter modulus", + SerializedName = @"modulus", + PossibleTypes = new [] { typeof(byte[]) })] + byte[] Modulu { get; set; } + + } + /// Specifies a RSA key for token validation + internal partial interface IContentKeyPolicyRsaTokenKeyInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal + { + /// The RSA Parameter exponent + byte[] Exponent { get; set; } + /// The RSA Parameter modulus + byte[] Modulu { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRsaTokenKey.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRsaTokenKey.json.cs new file mode 100644 index 000000000000..389e430bac11 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyRsaTokenKey.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a RSA key for token validation + public partial class ContentKeyPolicyRsaTokenKey + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyRsaTokenKey(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyRestrictionTokenKey = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey(json); + {_exponent = If( json?.PropertyT("exponent"), out var __w) ? System.Convert.FromBase64String( ((string)__w).Replace("_","/").Replace("-","+").PadRight( ((string)__w).Length + ((string)__w).Length * 3 % 4, '=') ) : null;} + {_modulu = If( json?.PropertyT("modulus"), out var __u) ? System.Convert.FromBase64String( ((string)__u).Replace("_","/").Replace("-","+").PadRight( ((string)__u).Length + ((string)__u).Length * 3 % 4, '=') ) : null;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRsaTokenKey. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRsaTokenKey. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRsaTokenKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyRsaTokenKey(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyRestrictionTokenKey?.ToJson(container, serializationMode); + AddIf( null != this._exponent ? global::System.Convert.ToBase64String( this._exponent) : null ,(v)=> container.Add( "exponent",v) ); + AddIf( null != this._modulu ? global::System.Convert.ToBase64String( this._modulu) : null ,(v)=> container.Add( "modulus",v) ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicySymmetricTokenKey.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicySymmetricTokenKey.cs new file mode 100644 index 000000000000..fa88057c8d4b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicySymmetricTokenKey.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a symmetric key for token validation. + public partial class ContentKeyPolicySymmetricTokenKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicySymmetricTokenKey, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicySymmetricTokenKeyInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey __contentKeyPolicyRestrictionTokenKey = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey(); + + /// Backing field for property. + private byte[] _keyValue; + + /// The key value of the key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public byte[] KeyValue { get => this._keyValue; set => this._keyValue = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal)__contentKeyPolicyRestrictionTokenKey).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal)__contentKeyPolicyRestrictionTokenKey).OdataType = value ; } + + /// Creates an new instance. + public ContentKeyPolicySymmetricTokenKey() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyRestrictionTokenKey), __contentKeyPolicyRestrictionTokenKey); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyRestrictionTokenKey), __contentKeyPolicyRestrictionTokenKey); + } + } + /// Specifies a symmetric key for token validation. + public partial interface IContentKeyPolicySymmetricTokenKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey + { + /// The key value of the key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The key value of the key", + SerializedName = @"keyValue", + PossibleTypes = new [] { typeof(byte[]) })] + byte[] KeyValue { get; set; } + + } + /// Specifies a symmetric key for token validation. + internal partial interface IContentKeyPolicySymmetricTokenKeyInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal + { + /// The key value of the key + byte[] KeyValue { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicySymmetricTokenKey.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicySymmetricTokenKey.json.cs new file mode 100644 index 000000000000..cc83212c7593 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicySymmetricTokenKey.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a symmetric key for token validation. + public partial class ContentKeyPolicySymmetricTokenKey + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicySymmetricTokenKey(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyRestrictionTokenKey = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey(json); + {_keyValue = If( json?.PropertyT("keyValue"), out var __w) ? System.Convert.FromBase64String( ((string)__w).Replace("_","/").Replace("-","+").PadRight( ((string)__w).Length + ((string)__w).Length * 3 % 4, '=') ) : null;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicySymmetricTokenKey. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicySymmetricTokenKey. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicySymmetricTokenKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicySymmetricTokenKey(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyRestrictionTokenKey?.ToJson(container, serializationMode); + AddIf( null != this._keyValue ? global::System.Convert.ToBase64String( this._keyValue) : null ,(v)=> container.Add( "keyValue",v) ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenClaim.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenClaim.cs new file mode 100644 index 000000000000..bb20553c4a4c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenClaim.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents a token claim. + public partial class ContentKeyPolicyTokenClaim : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaimInternal + { + + /// Backing field for property. + private string _claimType; + + /// Token claim type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ClaimType { get => this._claimType; set => this._claimType = value; } + + /// Backing field for property. + private string _claimValue; + + /// Token claim value. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ClaimValue { get => this._claimValue; set => this._claimValue = value; } + + /// Creates an new instance. + public ContentKeyPolicyTokenClaim() + { + + } + } + /// Represents a token claim. + public partial interface IContentKeyPolicyTokenClaim : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Token claim type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Token claim type.", + SerializedName = @"claimType", + PossibleTypes = new [] { typeof(string) })] + string ClaimType { get; set; } + /// Token claim value. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Token claim value.", + SerializedName = @"claimValue", + PossibleTypes = new [] { typeof(string) })] + string ClaimValue { get; set; } + + } + /// Represents a token claim. + internal partial interface IContentKeyPolicyTokenClaimInternal + + { + /// Token claim type. + string ClaimType { get; set; } + /// Token claim value. + string ClaimValue { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenClaim.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenClaim.json.cs new file mode 100644 index 000000000000..52fa6a6601a7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenClaim.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents a token claim. + public partial class ContentKeyPolicyTokenClaim + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyTokenClaim(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_claimType = If( json?.PropertyT("claimType"), out var __jsonClaimType) ? (string)__jsonClaimType : (string)ClaimType;} + {_claimValue = If( json?.PropertyT("claimValue"), out var __jsonClaimValue) ? (string)__jsonClaimValue : (string)ClaimValue;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyTokenClaim(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._claimType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._claimType.ToString()) : null, "claimType" ,container.Add ); + AddIf( null != (((object)this._claimValue)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._claimValue.ToString()) : null, "claimValue" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenRestriction.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenRestriction.cs new file mode 100644 index 000000000000..ccc37d8ab9dc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenRestriction.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents a token restriction. Provided token must match these requirements for successful license or key delivery. + /// + public partial class ContentKeyPolicyTokenRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenRestriction, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenRestrictionInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction __contentKeyPolicyRestriction = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestriction(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey[] _alternateVerificationKey; + + /// A list of alternative verification keys. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey[] AlternateVerificationKey { get => this._alternateVerificationKey; set => this._alternateVerificationKey = value; } + + /// Backing field for property. + private string _audience; + + /// The audience for the token. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Audience { get => this._audience; set => this._audience = value; } + + /// Backing field for property. + private string _issuer; + + /// The token issuer. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Issuer { get => this._issuer; set => this._issuer = value; } + + /// Internal Acessors for PrimaryVerificationKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenRestrictionInternal.PrimaryVerificationKey { get => (this._primaryVerificationKey = this._primaryVerificationKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey()); set { {_primaryVerificationKey = value;} } } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal)__contentKeyPolicyRestriction).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal)__contentKeyPolicyRestriction).OdataType = value ; } + + /// Backing field for property. + private string _openIdConnectDiscoveryDocument; + + /// The OpenID connect discovery document. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OpenIdConnectDiscoveryDocument { get => this._openIdConnectDiscoveryDocument; set => this._openIdConnectDiscoveryDocument = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey _primaryVerificationKey; + + /// The primary verification key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey PrimaryVerificationKey { get => (this._primaryVerificationKey = this._primaryVerificationKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey()); set => this._primaryVerificationKey = value; } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PrimaryVerificationKeyOdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal)PrimaryVerificationKey).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal)PrimaryVerificationKey).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim[] _requiredClaim; + + /// A list of required token claims. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim[] RequiredClaim { get => this._requiredClaim; set => this._requiredClaim = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType _restrictionTokenType; + + /// The type of token. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType RestrictionTokenType { get => this._restrictionTokenType; set => this._restrictionTokenType = value; } + + /// Creates an new instance. + public ContentKeyPolicyTokenRestriction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyRestriction), __contentKeyPolicyRestriction); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyRestriction), __contentKeyPolicyRestriction); + } + } + /// Represents a token restriction. Provided token must match these requirements for successful license or key delivery. + public partial interface IContentKeyPolicyTokenRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction + { + /// A list of alternative verification keys. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of alternative verification keys.", + SerializedName = @"alternateVerificationKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicySymmetricTokenKey),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRsaTokenKey),typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyX509CertificateTokenKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey[] AlternateVerificationKey { get; set; } + /// The audience for the token. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The audience for the token.", + SerializedName = @"audience", + PossibleTypes = new [] { typeof(string) })] + string Audience { get; set; } + /// The token issuer. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The token issuer.", + SerializedName = @"issuer", + PossibleTypes = new [] { typeof(string) })] + string Issuer { get; set; } + /// The OpenID connect discovery document. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OpenID connect discovery document.", + SerializedName = @"openIdConnectDiscoveryDocument", + PossibleTypes = new [] { typeof(string) })] + string OpenIdConnectDiscoveryDocument { get; set; } + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string PrimaryVerificationKeyOdataType { get; set; } + /// A list of required token claims. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of required token claims.", + SerializedName = @"requiredClaims", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim[] RequiredClaim { get; set; } + /// The type of token. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of token.", + SerializedName = @"restrictionTokenType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType RestrictionTokenType { get; set; } + + } + /// Represents a token restriction. Provided token must match these requirements for successful license or key delivery. + internal partial interface IContentKeyPolicyTokenRestrictionInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal + { + /// A list of alternative verification keys. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey[] AlternateVerificationKey { get; set; } + /// The audience for the token. + string Audience { get; set; } + /// The token issuer. + string Issuer { get; set; } + /// The OpenID connect discovery document. + string OpenIdConnectDiscoveryDocument { get; set; } + /// The primary verification key. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey PrimaryVerificationKey { get; set; } + /// The discriminator for derived types. + string PrimaryVerificationKeyOdataType { get; set; } + /// A list of required token claims. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim[] RequiredClaim { get; set; } + /// The type of token. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType RestrictionTokenType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenRestriction.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenRestriction.json.cs new file mode 100644 index 000000000000..12afad99a0b1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyTokenRestriction.json.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents a token restriction. Provided token must match these requirements for successful license or key delivery. + /// + public partial class ContentKeyPolicyTokenRestriction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyTokenRestriction(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyRestriction = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestriction(json); + {_primaryVerificationKey = If( json?.PropertyT("primaryVerificationKey"), out var __jsonPrimaryVerificationKey) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey.FromJson(__jsonPrimaryVerificationKey) : PrimaryVerificationKey;} + {_issuer = If( json?.PropertyT("issuer"), out var __jsonIssuer) ? (string)__jsonIssuer : (string)Issuer;} + {_audience = If( json?.PropertyT("audience"), out var __jsonAudience) ? (string)__jsonAudience : (string)Audience;} + {_alternateVerificationKey = If( json?.PropertyT("alternateVerificationKeys"), out var __jsonAlternateVerificationKeys) ? If( __jsonAlternateVerificationKeys as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey.FromJson(__u) )) ))() : null : AlternateVerificationKey;} + {_requiredClaim = If( json?.PropertyT("requiredClaims"), out var __jsonRequiredClaims) ? If( __jsonRequiredClaims as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenClaim) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyTokenClaim.FromJson(__p) )) ))() : null : RequiredClaim;} + {_restrictionTokenType = If( json?.PropertyT("restrictionTokenType"), out var __jsonRestrictionTokenType) ? (string)__jsonRestrictionTokenType : (string)RestrictionTokenType;} + {_openIdConnectDiscoveryDocument = If( json?.PropertyT("openIdConnectDiscoveryDocument"), out var __jsonOpenIdConnectDiscoveryDocument) ? (string)__jsonOpenIdConnectDiscoveryDocument : (string)OpenIdConnectDiscoveryDocument;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenRestriction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenRestriction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyTokenRestriction FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyTokenRestriction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyRestriction?.ToJson(container, serializationMode); + AddIf( null != this._primaryVerificationKey ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._primaryVerificationKey.ToJson(null,serializationMode) : null, "primaryVerificationKey" ,container.Add ); + AddIf( null != (((object)this._issuer)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._issuer.ToString()) : null, "issuer" ,container.Add ); + AddIf( null != (((object)this._audience)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._audience.ToString()) : null, "audience" ,container.Add ); + if (null != this._alternateVerificationKey) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._alternateVerificationKey ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("alternateVerificationKeys",__w); + } + if (null != this._requiredClaim) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._requiredClaim ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("requiredClaims",__r); + } + AddIf( null != (((object)this._restrictionTokenType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._restrictionTokenType.ToString()) : null, "restrictionTokenType" ,container.Add ); + AddIf( null != (((object)this._openIdConnectDiscoveryDocument)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._openIdConnectDiscoveryDocument.ToString()) : null, "openIdConnectDiscoveryDocument" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownConfiguration.cs new file mode 100644 index 000000000000..2b8854306124 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownConfiguration.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version. + /// + public partial class ContentKeyPolicyUnknownConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType = value ; } + + /// Creates an new instance. + public ContentKeyPolicyUnknownConfiguration() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + } + } + /// Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version. + public partial interface IContentKeyPolicyUnknownConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration + { + + } + /// Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version. + internal partial interface IContentKeyPolicyUnknownConfigurationInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownConfiguration.json.cs new file mode 100644 index 000000000000..92381c96edd6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownConfiguration.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version. + /// + public partial class ContentKeyPolicyUnknownConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyUnknownConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyUnknownConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyConfiguration?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownRestriction.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownRestriction.cs new file mode 100644 index 000000000000..5fbbb065b51a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownRestriction.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents a ContentKeyPolicyRestriction that is unavailable in the current API version. + /// + public partial class ContentKeyPolicyUnknownRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownRestriction, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownRestrictionInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction __contentKeyPolicyRestriction = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestriction(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal)__contentKeyPolicyRestriction).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal)__contentKeyPolicyRestriction).OdataType = value ; } + + /// Creates an new instance. + public ContentKeyPolicyUnknownRestriction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyRestriction), __contentKeyPolicyRestriction); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyRestriction), __contentKeyPolicyRestriction); + } + } + /// Represents a ContentKeyPolicyRestriction that is unavailable in the current API version. + public partial interface IContentKeyPolicyUnknownRestriction : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestriction + { + + } + /// Represents a ContentKeyPolicyRestriction that is unavailable in the current API version. + internal partial interface IContentKeyPolicyUnknownRestrictionInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownRestriction.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownRestriction.json.cs new file mode 100644 index 000000000000..1149d03db200 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyUnknownRestriction.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents a ContentKeyPolicyRestriction that is unavailable in the current API version. + /// + public partial class ContentKeyPolicyUnknownRestriction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyUnknownRestriction(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyRestriction = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestriction(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownRestriction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownRestriction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyUnknownRestriction FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyUnknownRestriction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyRestriction?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyWidevineConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyWidevineConfiguration.cs new file mode 100644 index 000000000000..ae98a7e88a9a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyWidevineConfiguration.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a configuration for Widevine licenses. + public partial class ContentKeyPolicyWidevineConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyWidevineConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyWidevineConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal)__contentKeyPolicyConfiguration).OdataType = value ; } + + /// Backing field for property. + private string _widevineTemplate; + + /// The Widevine template. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string WidevineTemplate { get => this._widevineTemplate; set => this._widevineTemplate = value; } + + /// Creates an new instance. + public ContentKeyPolicyWidevineConfiguration() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyConfiguration), __contentKeyPolicyConfiguration); + } + } + /// Specifies a configuration for Widevine licenses. + public partial interface IContentKeyPolicyWidevineConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfiguration + { + /// The Widevine template. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Widevine template.", + SerializedName = @"widevineTemplate", + PossibleTypes = new [] { typeof(string) })] + string WidevineTemplate { get; set; } + + } + /// Specifies a configuration for Widevine licenses. + internal partial interface IContentKeyPolicyWidevineConfigurationInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyConfigurationInternal + { + /// The Widevine template. + string WidevineTemplate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyWidevineConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyWidevineConfiguration.json.cs new file mode 100644 index 000000000000..d9f17f4c9f41 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyWidevineConfiguration.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a configuration for Widevine licenses. + public partial class ContentKeyPolicyWidevineConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyWidevineConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyConfiguration = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyConfiguration(json); + {_widevineTemplate = If( json?.PropertyT("widevineTemplate"), out var __jsonWidevineTemplate) ? (string)__jsonWidevineTemplate : (string)WidevineTemplate;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyWidevineConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyWidevineConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyWidevineConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyWidevineConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyConfiguration?.ToJson(container, serializationMode); + AddIf( null != (((object)this._widevineTemplate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._widevineTemplate.ToString()) : null, "widevineTemplate" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyX509CertificateTokenKey.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyX509CertificateTokenKey.cs new file mode 100644 index 000000000000..af1a5bb238ef --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyX509CertificateTokenKey.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a certificate for token validation. + public partial class ContentKeyPolicyX509CertificateTokenKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyX509CertificateTokenKey, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyX509CertificateTokenKeyInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey __contentKeyPolicyRestrictionTokenKey = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal)__contentKeyPolicyRestrictionTokenKey).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal)__contentKeyPolicyRestrictionTokenKey).OdataType = value ; } + + /// Backing field for property. + private byte[] _rawBody; + + /// + /// The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET) + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public byte[] RawBody { get => this._rawBody; set => this._rawBody = value; } + + /// Creates an new instance. + public ContentKeyPolicyX509CertificateTokenKey() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__contentKeyPolicyRestrictionTokenKey), __contentKeyPolicyRestrictionTokenKey); + await eventListener.AssertObjectIsValid(nameof(__contentKeyPolicyRestrictionTokenKey), __contentKeyPolicyRestrictionTokenKey); + } + } + /// Specifies a certificate for token validation. + public partial interface IContentKeyPolicyX509CertificateTokenKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKey + { + /// + /// The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET) + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET)", + SerializedName = @"rawBody", + PossibleTypes = new [] { typeof(byte[]) })] + byte[] RawBody { get; set; } + + } + /// Specifies a certificate for token validation. + internal partial interface IContentKeyPolicyX509CertificateTokenKeyInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyRestrictionTokenKeyInternal + { + /// + /// The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET) + /// + byte[] RawBody { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyX509CertificateTokenKey.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyX509CertificateTokenKey.json.cs new file mode 100644 index 000000000000..fe18cce1c0db --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ContentKeyPolicyX509CertificateTokenKey.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Specifies a certificate for token validation. + public partial class ContentKeyPolicyX509CertificateTokenKey + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ContentKeyPolicyX509CertificateTokenKey(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __contentKeyPolicyRestrictionTokenKey = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ContentKeyPolicyRestrictionTokenKey(json); + {_rawBody = If( json?.PropertyT("rawBody"), out var __w) ? System.Convert.FromBase64String( ((string)__w).Replace("_","/").Replace("-","+").PadRight( ((string)__w).Length + ((string)__w).Length * 3 % 4, '=') ) : null;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyX509CertificateTokenKey. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyX509CertificateTokenKey. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IContentKeyPolicyX509CertificateTokenKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ContentKeyPolicyX509CertificateTokenKey(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __contentKeyPolicyRestrictionTokenKey?.ToJson(container, serializationMode); + AddIf( null != this._rawBody ? global::System.Convert.ToBase64String( this._rawBody) : null ,(v)=> container.Add( "rawBody",v) ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CrossSiteAccessPolicies.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CrossSiteAccessPolicies.cs new file mode 100644 index 000000000000..44c33eb8b17f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CrossSiteAccessPolicies.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The client access policy. + public partial class CrossSiteAccessPolicies : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPoliciesInternal + { + + /// Backing field for property. + private string _clientAccessPolicy; + + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ClientAccessPolicy { get => this._clientAccessPolicy; set => this._clientAccessPolicy = value; } + + /// Backing field for property. + private string _crossDomainPolicy; + + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CrossDomainPolicy { get => this._crossDomainPolicy; set => this._crossDomainPolicy = value; } + + /// Creates an new instance. + public CrossSiteAccessPolicies() + { + + } + } + /// The client access policy. + public partial interface ICrossSiteAccessPolicies : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of clientaccesspolicy.xml used by Silverlight.", + SerializedName = @"clientAccessPolicy", + PossibleTypes = new [] { typeof(string) })] + string ClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of crossdomain.xml used by Silverlight.", + SerializedName = @"crossDomainPolicy", + PossibleTypes = new [] { typeof(string) })] + string CrossDomainPolicy { get; set; } + + } + /// The client access policy. + internal partial interface ICrossSiteAccessPoliciesInternal + + { + /// The content of clientaccesspolicy.xml used by Silverlight. + string ClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + string CrossDomainPolicy { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/CrossSiteAccessPolicies.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/CrossSiteAccessPolicies.json.cs new file mode 100644 index 000000000000..5c7d958177d7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/CrossSiteAccessPolicies.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The client access policy. + public partial class CrossSiteAccessPolicies + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal CrossSiteAccessPolicies(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_clientAccessPolicy = If( json?.PropertyT("clientAccessPolicy"), out var __jsonClientAccessPolicy) ? (string)__jsonClientAccessPolicy : (string)ClientAccessPolicy;} + {_crossDomainPolicy = If( json?.PropertyT("crossDomainPolicy"), out var __jsonCrossDomainPolicy) ? (string)__jsonCrossDomainPolicy : (string)CrossDomainPolicy;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new CrossSiteAccessPolicies(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._clientAccessPolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._clientAccessPolicy.ToString()) : null, "clientAccessPolicy" ,container.Add ); + AddIf( null != (((object)this._crossDomainPolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._crossDomainPolicy.ToString()) : null, "crossDomainPolicy" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/DashSettings.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/DashSettings.cs new file mode 100644 index 000000000000..72ca7471234f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/DashSettings.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The DASH setting for a track. + public partial class DashSettings : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettings, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettingsInternal + { + + /// Backing field for property. + private string _role; + + /// The role for the DASH setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Role { get => this._role; set => this._role = value; } + + /// Creates an new instance. + public DashSettings() + { + + } + } + /// The DASH setting for a track. + public partial interface IDashSettings : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The role for the DASH setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The role for the DASH setting.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(string) })] + string Role { get; set; } + + } + /// The DASH setting for a track. + internal partial interface IDashSettingsInternal + + { + /// The role for the DASH setting. + string Role { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/DashSettings.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/DashSettings.json.cs new file mode 100644 index 000000000000..4eeb4f3fd776 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/DashSettings.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The DASH setting for a track. + public partial class DashSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal DashSettings(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)Role;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDashSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new DashSettings(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._role.ToString()) : null, "role" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/DefaultKey.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/DefaultKey.cs new file mode 100644 index 000000000000..a1906d1cc02d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/DefaultKey.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify properties of default content key for each encryption scheme + public partial class DefaultKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKeyInternal + { + + /// Backing field for property. + private string _label; + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Label { get => this._label; set => this._label = value; } + + /// Backing field for property. + private string _policyName; + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PolicyName { get => this._policyName; set => this._policyName = value; } + + /// Creates an new instance. + public DefaultKey() + { + + } + } + /// Class to specify properties of default content key for each encryption scheme + public partial interface IDefaultKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string Label { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; set; } + + } + /// Class to specify properties of default content key for each encryption scheme + internal partial interface IDefaultKeyInternal + + { + /// Label can be used to specify Content Key when creating a Streaming Locator + string Label { get; set; } + /// Policy used by Default Key + string PolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/DefaultKey.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/DefaultKey.json.cs new file mode 100644 index 000000000000..956cf35ecd95 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/DefaultKey.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify properties of default content key for each encryption scheme + public partial class DefaultKey + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal DefaultKey(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_label = If( json?.PropertyT("label"), out var __jsonLabel) ? (string)__jsonLabel : (string)Label;} + {_policyName = If( json?.PropertyT("policyName"), out var __jsonPolicyName) ? (string)__jsonPolicyName : (string)PolicyName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new DefaultKey(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._label)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._label.ToString()) : null, "label" ,container.Add ); + AddIf( null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/EnabledProtocols.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/EnabledProtocols.cs new file mode 100644 index 000000000000..a6c8445dd9d6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/EnabledProtocols.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify which protocols are enabled + public partial class EnabledProtocols : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal + { + + /// Backing field for property. + private bool _dash; + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool Dash { get => this._dash; set => this._dash = value; } + + /// Backing field for property. + private bool _download; + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool Download { get => this._download; set => this._download = value; } + + /// Backing field for property. + private bool _hl; + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool Hl { get => this._hl; set => this._hl = value; } + + /// Backing field for property. + private bool _smoothStreaming; + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool SmoothStreaming { get => this._smoothStreaming; set => this._smoothStreaming = value; } + + /// Creates an new instance. + public EnabledProtocols() + { + + } + } + /// Class to specify which protocols are enabled + public partial interface IEnabledProtocols : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool Dash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool Download { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool Hl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool SmoothStreaming { get; set; } + + } + /// Class to specify which protocols are enabled + internal partial interface IEnabledProtocolsInternal + + { + /// Enable DASH protocol or not + bool Dash { get; set; } + /// Enable Download protocol or not + bool Download { get; set; } + /// Enable HLS protocol or not + bool Hl { get; set; } + /// Enable SmoothStreaming protocol or not + bool SmoothStreaming { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/EnabledProtocols.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/EnabledProtocols.json.cs new file mode 100644 index 000000000000..263a4436c154 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/EnabledProtocols.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify which protocols are enabled + public partial class EnabledProtocols + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal EnabledProtocols(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_download = If( json?.PropertyT("download"), out var __jsonDownload) ? (bool)__jsonDownload : Download;} + {_dash = If( json?.PropertyT("dash"), out var __jsonDash) ? (bool)__jsonDash : Dash;} + {_hl = If( json?.PropertyT("hls"), out var __jsonHls) ? (bool)__jsonHls : Hl;} + {_smoothStreaming = If( json?.PropertyT("smoothStreaming"), out var __jsonSmoothStreaming) ? (bool)__jsonSmoothStreaming : SmoothStreaming;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new EnabledProtocols(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._download), "download" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._dash), "dash" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._hl), "hls" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._smoothStreaming), "smoothStreaming" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/EnvelopeEncryption.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/EnvelopeEncryption.cs new file mode 100644 index 000000000000..f1b5f7a8bd68 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/EnvelopeEncryption.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for EnvelopeEncryption encryption scheme + public partial class EnvelopeEncryption : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] _clearTrack; + + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] ClearTrack { get => this._clearTrack; set => this._clearTrack = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys _contentKey; + + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys ContentKey { get => (this._contentKey = this._contentKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKeys()); set => this._contentKey = value; } + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] ContentKeyToTrackMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).KeyToTrackMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).KeyToTrackMapping = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _customKeyAcquisitionUrlTemplate; + + /// + /// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services + /// for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific + /// to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CustomKeyAcquisitionUrlTemplate { get => this._customKeyAcquisitionUrlTemplate; set => this._customKeyAcquisitionUrlTemplate = value; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyLabel = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKeyPolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols _enabledProtocol; + + /// Representing supported protocols + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnabledProtocol { get => (this._enabledProtocol = this._enabledProtocol ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols()); set => this._enabledProtocol = value; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Dash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Dash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Download; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Download = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Hl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Hl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).SmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).SmoothStreaming = value ?? default(bool); } + + /// Internal Acessors for ContentKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal.ContentKey { get => (this._contentKey = this._contentKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKeys()); set { {_contentKey = value;} } } + + /// Internal Acessors for ContentKeyDefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal.ContentKeyDefaultKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal)ContentKey).DefaultKey = value; } + + /// Internal Acessors for EnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal.EnabledProtocol { get => (this._enabledProtocol = this._enabledProtocol ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols()); set { {_enabledProtocol = value;} } } + + /// Creates an new instance. + public EnvelopeEncryption() + { + + } + } + /// Class for EnvelopeEncryption encryption scheme + public partial interface IEnvelopeEncryption : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing which tracks should not be encrypted", + SerializedName = @"clearTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] ClearTrack { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] ContentKeyToTrackMapping { get; set; } + /// + /// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services + /// for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific + /// to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customKeyAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CustomKeyAcquisitionUrlTemplate { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string DefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string DefaultKeyPolicyName { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolSmoothStreaming { get; set; } + + } + /// Class for EnvelopeEncryption encryption scheme + internal partial interface IEnvelopeEncryptionInternal + + { + /// Representing which tracks should not be encrypted + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] ClearTrack { get; set; } + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys ContentKey { get; set; } + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey ContentKeyDefaultKey { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] ContentKeyToTrackMapping { get; set; } + /// + /// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services + /// for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific + /// to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. + /// + string CustomKeyAcquisitionUrlTemplate { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string DefaultKeyLabel { get; set; } + /// Policy used by Default Key + string DefaultKeyPolicyName { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? EnabledProtocolDash { get; set; } + /// Enable Download protocol or not + bool? EnabledProtocolDownload { get; set; } + /// Enable HLS protocol or not + bool? EnabledProtocolHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? EnabledProtocolSmoothStreaming { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/EnvelopeEncryption.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/EnvelopeEncryption.json.cs new file mode 100644 index 000000000000..a5f85a21d5d6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/EnvelopeEncryption.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for EnvelopeEncryption encryption scheme + public partial class EnvelopeEncryption + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal EnvelopeEncryption(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabledProtocol = If( json?.PropertyT("enabledProtocols"), out var __jsonEnabledProtocols) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols.FromJson(__jsonEnabledProtocols) : EnabledProtocol;} + {_contentKey = If( json?.PropertyT("contentKeys"), out var __jsonContentKeys) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKeys.FromJson(__jsonContentKeys) : ContentKey;} + {_clearTrack = If( json?.PropertyT("clearTracks"), out var __jsonClearTracks) ? If( __jsonClearTracks as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackSelection.FromJson(__u) )) ))() : null : ClearTrack;} + {_customKeyAcquisitionUrlTemplate = If( json?.PropertyT("customKeyAcquisitionUrlTemplate"), out var __jsonCustomKeyAcquisitionUrlTemplate) ? (string)__jsonCustomKeyAcquisitionUrlTemplate : (string)CustomKeyAcquisitionUrlTemplate;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new EnvelopeEncryption(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enabledProtocol ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._enabledProtocol.ToJson(null,serializationMode) : null, "enabledProtocols" ,container.Add ); + AddIf( null != this._contentKey ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._contentKey.ToJson(null,serializationMode) : null, "contentKeys" ,container.Add ); + if (null != this._clearTrack) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._clearTrack ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("clearTracks",__w); + } + AddIf( null != (((object)this._customKeyAcquisitionUrlTemplate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._customKeyAcquisitionUrlTemplate.ToString()) : null, "customKeyAcquisitionUrlTemplate" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackPropertyCondition.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackPropertyCondition.cs new file mode 100644 index 000000000000..50371d46a32a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackPropertyCondition.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The class to specify one track property condition. + public partial class FilterTrackPropertyCondition : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyConditionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation _operation; + + /// The track property condition operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation Operation { get => this._operation; set => this._operation = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType _property; + + /// The track property type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType Property { get => this._property; set => this._property = value; } + + /// Backing field for property. + private string _value; + + /// The track property value. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public FilterTrackPropertyCondition() + { + + } + } + /// The class to specify one track property condition. + public partial interface IFilterTrackPropertyCondition : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The track property condition operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The track property condition operation.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation Operation { get; set; } + /// The track property type. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The track property type.", + SerializedName = @"property", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType Property { get; set; } + /// The track property value. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The track property value.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// The class to specify one track property condition. + internal partial interface IFilterTrackPropertyConditionInternal + + { + /// The track property condition operation. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation Operation { get; set; } + /// The track property type. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType Property { get; set; } + /// The track property value. + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackPropertyCondition.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackPropertyCondition.json.cs new file mode 100644 index 000000000000..03fb1301db29 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackPropertyCondition.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The class to specify one track property condition. + public partial class FilterTrackPropertyCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal FilterTrackPropertyCondition(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("property"), out var __jsonProperty) ? (string)__jsonProperty : (string)Property;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new FilterTrackPropertyCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._property)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._property.ToString()) : null, "property" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackSelection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackSelection.cs new file mode 100644 index 000000000000..04cbbbbd00d6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackSelection.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Representing a list of FilterTrackPropertyConditions to select a track. The filters are combined using a logical AND operation. + /// + public partial class FilterTrackSelection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelectionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition[] _trackSelection; + + /// The track selections. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition[] TrackSelection { get => this._trackSelection; set => this._trackSelection = value; } + + /// Creates an new instance. + public FilterTrackSelection() + { + + } + } + /// Representing a list of FilterTrackPropertyConditions to select a track. The filters are combined using a logical AND operation. + public partial interface IFilterTrackSelection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The track selections. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The track selections.", + SerializedName = @"trackSelections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition[] TrackSelection { get; set; } + + } + /// Representing a list of FilterTrackPropertyConditions to select a track. The filters are combined using a logical AND operation. + internal partial interface IFilterTrackSelectionInternal + + { + /// The track selections. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition[] TrackSelection { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackSelection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackSelection.json.cs new file mode 100644 index 000000000000..82ed19d1db4a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/FilterTrackSelection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Representing a list of FilterTrackPropertyConditions to select a track. The filters are combined using a logical AND operation. + /// + public partial class FilterTrackSelection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal FilterTrackSelection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_trackSelection = If( json?.PropertyT("trackSelections"), out var __jsonTrackSelections) ? If( __jsonTrackSelections as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackPropertyCondition) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.FilterTrackPropertyCondition.FromJson(__u) )) ))() : null : TrackSelection;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new FilterTrackSelection(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._trackSelection) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._trackSelection ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("trackSelections",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/FirstQuality.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/FirstQuality.cs new file mode 100644 index 000000000000..e5fc1dfc30d5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/FirstQuality.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Filter First Quality + public partial class FirstQuality : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQualityInternal + { + + /// Backing field for property. + private int _bitrate; + + /// The first quality bitrate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int Bitrate { get => this._bitrate; set => this._bitrate = value; } + + /// Creates an new instance. + public FirstQuality() + { + + } + } + /// Filter First Quality + public partial interface IFirstQuality : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The first quality bitrate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The first quality bitrate.", + SerializedName = @"bitrate", + PossibleTypes = new [] { typeof(int) })] + int Bitrate { get; set; } + + } + /// Filter First Quality + internal partial interface IFirstQualityInternal + + { + /// The first quality bitrate. + int Bitrate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/FirstQuality.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/FirstQuality.json.cs new file mode 100644 index 000000000000..33a96f0be2c6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/FirstQuality.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Filter First Quality + public partial class FirstQuality + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal FirstQuality(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_bitrate = If( json?.PropertyT("bitrate"), out var __jsonBitrate) ? (int)__jsonBitrate : Bitrate;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new FirstQuality(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._bitrate), "bitrate" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/Hls.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/Hls.cs new file mode 100644 index 000000000000..49ee7826f729 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/Hls.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// HTTP Live Streaming (HLS) packing setting for the live output. + public partial class Hls : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsInternal + { + + /// Backing field for property. + private int? _fragmentsPerTsSegment; + + /// + /// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not + /// affect the packing ratio for HLS CMAF output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? FragmentsPerTsSegment { get => this._fragmentsPerTsSegment; set => this._fragmentsPerTsSegment = value; } + + /// Creates an new instance. + public Hls() + { + + } + } + /// HTTP Live Streaming (HLS) packing setting for the live output. + public partial interface IHls : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not + /// affect the packing ratio for HLS CMAF output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not affect the packing ratio for HLS CMAF output.", + SerializedName = @"fragmentsPerTsSegment", + PossibleTypes = new [] { typeof(int) })] + int? FragmentsPerTsSegment { get; set; } + + } + /// HTTP Live Streaming (HLS) packing setting for the live output. + internal partial interface IHlsInternal + + { + /// + /// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not + /// affect the packing ratio for HLS CMAF output. + /// + int? FragmentsPerTsSegment { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/Hls.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/Hls.json.cs new file mode 100644 index 000000000000..23efd8df3ea2 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/Hls.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// HTTP Live Streaming (HLS) packing setting for the live output. + public partial class Hls + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new Hls(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal Hls(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_fragmentsPerTsSegment = If( json?.PropertyT("fragmentsPerTsSegment"), out var __jsonFragmentsPerTsSegment) ? (int?)__jsonFragmentsPerTsSegment : FragmentsPerTsSegment;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._fragmentsPerTsSegment ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._fragmentsPerTsSegment) : null, "fragmentsPerTsSegment" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/HlsSettings.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/HlsSettings.cs new file mode 100644 index 000000000000..3dbb2fbe6d11 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/HlsSettings.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The HLS setting for a track. + public partial class HlsSettings : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal + { + + /// Backing field for property. + private string _characteristic; + + /// The characteristics for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Characteristic { get => this._characteristic; set => this._characteristic = value; } + + /// Backing field for property. + private bool? _default; + + /// The default for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? Default { get => this._default; set => this._default = value; } + + /// Backing field for property. + private bool? _forced; + + /// The forced for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? Forced { get => this._forced; set => this._forced = value; } + + /// Creates an new instance. + public HlsSettings() + { + + } + } + /// The HLS setting for a track. + public partial interface IHlsSettings : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The characteristics for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The characteristics for the HLS setting.", + SerializedName = @"characteristics", + PossibleTypes = new [] { typeof(string) })] + string Characteristic { get; set; } + /// The default for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default for the HLS setting.", + SerializedName = @"default", + PossibleTypes = new [] { typeof(bool) })] + bool? Default { get; set; } + /// The forced for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The forced for the HLS setting.", + SerializedName = @"forced", + PossibleTypes = new [] { typeof(bool) })] + bool? Forced { get; set; } + + } + /// The HLS setting for a track. + internal partial interface IHlsSettingsInternal + + { + /// The characteristics for the HLS setting. + string Characteristic { get; set; } + /// The default for the HLS setting. + bool? Default { get; set; } + /// The forced for the HLS setting. + bool? Forced { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/HlsSettings.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/HlsSettings.json.cs new file mode 100644 index 000000000000..d2557a3aa5e6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/HlsSettings.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The HLS setting for a track. + public partial class HlsSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new HlsSettings(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal HlsSettings(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_default = If( json?.PropertyT("default"), out var __jsonDefault) ? (bool?)__jsonDefault : Default;} + {_forced = If( json?.PropertyT("forced"), out var __jsonForced) ? (bool?)__jsonForced : Forced;} + {_characteristic = If( json?.PropertyT("characteristics"), out var __jsonCharacteristics) ? (string)__jsonCharacteristics : (string)Characteristic;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._default ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._default) : null, "default" ,container.Add ); + AddIf( null != this._forced ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._forced) : null, "forced" ,container.Add ); + AddIf( null != (((object)this._characteristic)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._characteristic.ToString()) : null, "characteristics" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/IPAccessControl.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/IPAccessControl.cs new file mode 100644 index 000000000000..abfd8e8d11d9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/IPAccessControl.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The IP access control. + public partial class IPAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControlInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] _allow; + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] Allow { get => this._allow; set => this._allow = value; } + + /// Creates an new instance. + public IPAccessControl() + { + + } + } + /// The IP access control. + public partial interface IIPAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] Allow { get; set; } + + } + /// The IP access control. + internal partial interface IIPAccessControlInternal + + { + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] Allow { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/IPAccessControl.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/IPAccessControl.json.cs new file mode 100644 index 000000000000..26d88aec62f1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/IPAccessControl.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The IP access control. + public partial class IPAccessControl + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new IPAccessControl(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal IPAccessControl(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_allow = If( json?.PropertyT("allow"), out var __jsonAllow) ? If( __jsonAllow as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPRange.FromJson(__u) )) ))() : null : Allow;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._allow) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._allow ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("allow",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/IPRange.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/IPRange.cs new file mode 100644 index 000000000000..161a9d96c945 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/IPRange.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The IP address range in the CIDR scheme. + public partial class IPRange : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRangeInternal + { + + /// Backing field for property. + private string _address; + + /// The IP address. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Address { get => this._address; set => this._address = value; } + + /// Backing field for property. + private string _name; + + /// The friendly name for the IP address range. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private int? _subnetPrefixLength; + + /// The subnet mask prefix length (see CIDR notation). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? SubnetPrefixLength { get => this._subnetPrefixLength; set => this._subnetPrefixLength = value; } + + /// Creates an new instance. + public IPRange() + { + + } + } + /// The IP address range in the CIDR scheme. + public partial interface IIPRange : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The IP address. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP address.", + SerializedName = @"address", + PossibleTypes = new [] { typeof(string) })] + string Address { get; set; } + /// The friendly name for the IP address range. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The friendly name for the IP address range.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The subnet mask prefix length (see CIDR notation). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The subnet mask prefix length (see CIDR notation).", + SerializedName = @"subnetPrefixLength", + PossibleTypes = new [] { typeof(int) })] + int? SubnetPrefixLength { get; set; } + + } + /// The IP address range in the CIDR scheme. + internal partial interface IIPRangeInternal + + { + /// The IP address. + string Address { get; set; } + /// The friendly name for the IP address range. + string Name { get; set; } + /// The subnet mask prefix length (see CIDR notation). + int? SubnetPrefixLength { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/IPRange.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/IPRange.json.cs new file mode 100644 index 000000000000..40f7794761e7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/IPRange.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The IP address range in the CIDR scheme. + public partial class IPRange + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new IPRange(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal IPRange(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_address = If( json?.PropertyT("address"), out var __jsonAddress) ? (string)__jsonAddress : (string)Address;} + {_subnetPrefixLength = If( json?.PropertyT("subnetPrefixLength"), out var __jsonSubnetPrefixLength) ? (int?)__jsonSubnetPrefixLength : SubnetPrefixLength;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._address)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._address.ToString()) : null, "address" ,container.Add ); + AddIf( null != this._subnetPrefixLength ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._subnetPrefixLength) : null, "subnetPrefixLength" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContainerSasInput.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContainerSasInput.cs new file mode 100644 index 000000000000..94e38c9c2765 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContainerSasInput.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The parameters to the list SAS request. + public partial class ListContainerSasInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContainerSasInput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContainerSasInputInternal + { + + /// Backing field for property. + private global::System.DateTime? _expiryTime; + + /// + /// The SAS URL expiration time. This must be less than 24 hours from the current time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? ExpiryTime { get => this._expiryTime; set => this._expiryTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission? _permission; + + /// The permissions to set on the SAS URL. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission? Permission { get => this._permission; set => this._permission = value; } + + /// Creates an new instance. + public ListContainerSasInput() + { + + } + } + /// The parameters to the list SAS request. + public partial interface IListContainerSasInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The SAS URL expiration time. This must be less than 24 hours from the current time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SAS URL expiration time. This must be less than 24 hours from the current time.", + SerializedName = @"expiryTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExpiryTime { get; set; } + /// The permissions to set on the SAS URL. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The permissions to set on the SAS URL.", + SerializedName = @"permissions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission? Permission { get; set; } + + } + /// The parameters to the list SAS request. + internal partial interface IListContainerSasInputInternal + + { + /// + /// The SAS URL expiration time. This must be less than 24 hours from the current time. + /// + global::System.DateTime? ExpiryTime { get; set; } + /// The permissions to set on the SAS URL. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission? Permission { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContainerSasInput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContainerSasInput.json.cs new file mode 100644 index 000000000000..92fe3f9565a8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContainerSasInput.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The parameters to the list SAS request. + public partial class ListContainerSasInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContainerSasInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContainerSasInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContainerSasInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ListContainerSasInput(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ListContainerSasInput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_permission = If( json?.PropertyT("permissions"), out var __jsonPermissions) ? (string)__jsonPermissions : (string)Permission;} + {_expiryTime = If( json?.PropertyT("expiryTime"), out var __jsonExpiryTime) ? global::System.DateTime.TryParse((string)__jsonExpiryTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpiryTimeValue) ? __jsonExpiryTimeValue : ExpiryTime : ExpiryTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._permission)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._permission.ToString()) : null, "permissions" ,container.Add ); + AddIf( null != this._expiryTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._expiryTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expiryTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContentKeysResponse.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContentKeysResponse.cs new file mode 100644 index 000000000000..3b113ca8783a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContentKeysResponse.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class of response for listContentKeys action + public partial class ListContentKeysResponse : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContentKeysResponse, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContentKeysResponseInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] _contentKey; + + /// ContentKeys used by current Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] ContentKey { get => this._contentKey; set => this._contentKey = value; } + + /// Creates an new instance. + public ListContentKeysResponse() + { + + } + } + /// Class of response for listContentKeys action + public partial interface IListContentKeysResponse : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// ContentKeys used by current Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ContentKeys used by current Streaming Locator", + SerializedName = @"contentKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] ContentKey { get; set; } + + } + /// Class of response for listContentKeys action + internal partial interface IListContentKeysResponseInternal + + { + /// ContentKeys used by current Streaming Locator + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] ContentKey { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContentKeysResponse.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContentKeysResponse.json.cs new file mode 100644 index 000000000000..771bd9020479 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListContentKeysResponse.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class of response for listContentKeys action + public partial class ListContentKeysResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContentKeysResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContentKeysResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListContentKeysResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ListContentKeysResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ListContentKeysResponse(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_contentKey = If( json?.PropertyT("contentKeys"), out var __jsonContentKeys) ? If( __jsonContentKeys as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingLocatorContentKey.FromJson(__u) )) ))() : null : ContentKey;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._contentKey) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._contentKey ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("contentKeys",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ListPathsResponse.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListPathsResponse.cs new file mode 100644 index 000000000000..6e567deaede5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListPathsResponse.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class of response for listPaths action + public partial class ListPathsResponse : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListPathsResponse, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListPathsResponseInternal + { + + /// Backing field for property. + private string[] _downloadPath; + + /// Download Paths supported by current Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] DownloadPath { get => this._downloadPath; set => this._downloadPath = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath[] _streamingPath; + + /// Streaming Paths supported by current Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath[] StreamingPath { get => this._streamingPath; set => this._streamingPath = value; } + + /// Creates an new instance. + public ListPathsResponse() + { + + } + } + /// Class of response for listPaths action + public partial interface IListPathsResponse : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Download Paths supported by current Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Download Paths supported by current Streaming Locator", + SerializedName = @"downloadPaths", + PossibleTypes = new [] { typeof(string) })] + string[] DownloadPath { get; set; } + /// Streaming Paths supported by current Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Streaming Paths supported by current Streaming Locator", + SerializedName = @"streamingPaths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath[] StreamingPath { get; set; } + + } + /// Class of response for listPaths action + internal partial interface IListPathsResponseInternal + + { + /// Download Paths supported by current Streaming Locator + string[] DownloadPath { get; set; } + /// Streaming Paths supported by current Streaming Locator + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath[] StreamingPath { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ListPathsResponse.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListPathsResponse.json.cs new file mode 100644 index 000000000000..91009ce71510 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListPathsResponse.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class of response for listPaths action + public partial class ListPathsResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListPathsResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListPathsResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListPathsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ListPathsResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ListPathsResponse(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_streamingPath = If( json?.PropertyT("streamingPaths"), out var __jsonStreamingPaths) ? If( __jsonStreamingPaths as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPath.FromJson(__u) )) ))() : null : StreamingPath;} + {_downloadPath = If( json?.PropertyT("downloadPaths"), out var __jsonDownloadPaths) ? If( __jsonDownloadPaths as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : DownloadPath;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._streamingPath) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._streamingPath ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("streamingPaths",__w); + } + if (null != this._downloadPath) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._downloadPath ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("downloadPaths",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ListStreamingLocatorsResponse.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListStreamingLocatorsResponse.cs new file mode 100644 index 000000000000..091828ee1789 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListStreamingLocatorsResponse.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Streaming Locators associated with this Asset. + public partial class ListStreamingLocatorsResponse : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListStreamingLocatorsResponse, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListStreamingLocatorsResponseInternal + { + + /// Internal Acessors for StreamingLocator + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListStreamingLocatorsResponseInternal.StreamingLocator { get => this._streamingLocator; set { {_streamingLocator = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator[] _streamingLocator; + + /// The list of Streaming Locators. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator[] StreamingLocator { get => this._streamingLocator; } + + /// Creates an new instance. + public ListStreamingLocatorsResponse() + { + + } + } + /// The Streaming Locators associated with this Asset. + public partial interface IListStreamingLocatorsResponse : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The list of Streaming Locators. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of Streaming Locators.", + SerializedName = @"streamingLocators", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator[] StreamingLocator { get; } + + } + /// The Streaming Locators associated with this Asset. + internal partial interface IListStreamingLocatorsResponseInternal + + { + /// The list of Streaming Locators. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator[] StreamingLocator { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/ListStreamingLocatorsResponse.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListStreamingLocatorsResponse.json.cs new file mode 100644 index 000000000000..a7d2e7825ef7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/ListStreamingLocatorsResponse.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Streaming Locators associated with this Asset. + public partial class ListStreamingLocatorsResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListStreamingLocatorsResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListStreamingLocatorsResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IListStreamingLocatorsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new ListStreamingLocatorsResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal ListStreamingLocatorsResponse(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_streamingLocator = If( json?.PropertyT("streamingLocators"), out var __jsonStreamingLocators) ? If( __jsonStreamingLocators as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetStreamingLocator) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetStreamingLocator.FromJson(__u) )) ))() : null : StreamingLocator;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._streamingLocator) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._streamingLocator ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("streamingLocators",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEvent.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEvent.cs new file mode 100644 index 000000000000..e7301071ec2c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEvent.cs @@ -0,0 +1,757 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The live event. + public partial class LiveEvent : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.TrackedResource(); + + /// The creation time for the live event + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Created; } + + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CrossSiteAccessPolicyClientAccessPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).CrossSiteAccessPolicyClientAccessPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).CrossSiteAccessPolicyClientAccessPolicy = value ?? null; } + + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CrossSiteAccessPolicyCrossDomainPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).CrossSiteAccessPolicyCrossDomainPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).CrossSiteAccessPolicyCrossDomainPolicy = value ?? null; } + + /// A description for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Description = value ?? null; } + + /// + /// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks + /// of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame + /// interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment + /// duration defaults to 2 seconds. The value cannot be set for pass-through live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.TimeSpan? EncodingKeyFrameInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).EncodingKeyFrameInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).EncodingKeyFrameInterval = value ?? default(global::System.TimeSpan); } + + /// + /// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot + /// be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType + /// is set to Premium1080p, the default preset is ‘Default1080p’. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EncodingPresetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).EncodingPresetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).EncodingPresetName = value ?? null; } + + /// + /// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? EncodingStretchMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).EncodingStretchMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).EncodingStretchMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? EncodingType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).EncodingType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).EncodingType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string HostnamePrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).HostnamePrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).HostnamePrefix = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Id; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] InputAccessControlIPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputAccessControlIPAllow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputAccessControlIPAllow = value ?? null /* arrayOf */; } + + /// + /// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If + /// omitted, the service will generate a unique value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string InputAccessToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputAccessToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputAccessToken = value ?? null; } + + /// The input endpoints for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] InputEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputEndpoint = value ?? null /* arrayOf */; } + + /// + /// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property + /// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string InputKeyFrameIntervalDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputKeyFrameIntervalDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputKeyFrameIntervalDuration = value ?? null; } + + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol? InputStreamingProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputStreamingProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputStreamingProtocol = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol)""); } + + /// The last modified time of the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).LastModified; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Type = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Created; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Created = value; } + + /// Internal Acessors for CrossSiteAccessPolicy + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.CrossSiteAccessPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).CrossSiteAccessPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).CrossSiteAccessPolicy = value; } + + /// Internal Acessors for Encoding + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.Encoding { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Encoding; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Encoding = value; } + + /// Internal Acessors for Input + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Input = value; } + + /// Internal Acessors for InputAccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.InputAccessControl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputAccessControl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputAccessControl = value; } + + /// Internal Acessors for InputAccessControlIP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.InputAccessControlIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputAccessControlIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).InputAccessControlIP = value; } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).LastModified; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).LastModified = value; } + + /// Internal Acessors for Preview + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.Preview { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Preview; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Preview = value; } + + /// Internal Acessors for PreviewAccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.PreviewAccessControl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewAccessControl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewAccessControl = value; } + + /// Internal Acessors for PreviewAccessControlIP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.PreviewAccessControlIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewAccessControlIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewAccessControlIP = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).ResourceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).ResourceState = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Name; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] PreviewAccessControlIPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewAccessControlIPAllow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewAccessControlIPAllow = value ?? null /* arrayOf */; } + + /// + /// An alternative media identifier associated with the streaming locator created for the preview. This value is specified + /// at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate + /// of the StreamingPolicy specified in the StreamingPolicyName field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PreviewAlternativeMediaId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewAlternativeMediaId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewAlternativeMediaId = value ?? null; } + + /// + /// The endpoints for preview. Do not share the preview URL with the live event audience. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] PreviewEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewEndpoint = value ?? null /* arrayOf */; } + + /// + /// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview + /// locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot + /// be updated once the live event is created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PreviewLocator { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewLocator; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewLocator = value ?? null; } + + /// + /// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PreviewStreamingPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewStreamingPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).PreviewStreamingPolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventProperties _property; + + /// The live event properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventProperties()); set => this._property = value; } + + /// The provisioning state of the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).ProvisioningState; } + + /// + /// The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState? ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).ResourceState; } + + /// + /// 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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag[] StreamOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).StreamOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).StreamOption = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information + /// about the live transcription feature. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription[] Transcription { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Transcription; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).Transcription = value ?? null /* arrayOf */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Type; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? UseStaticHostname { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).UseStaticHostname; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal)Property).UseStaticHostname = value ?? default(bool); } + + /// Creates an new instance. + public LiveEvent() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// The live event. + public partial interface ILiveEvent : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource + { + /// The creation time for the live event + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation time for the live event", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of clientaccesspolicy.xml used by Silverlight.", + SerializedName = @"clientAccessPolicy", + PossibleTypes = new [] { typeof(string) })] + string CrossSiteAccessPolicyClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of crossdomain.xml used by Silverlight.", + SerializedName = @"crossDomainPolicy", + PossibleTypes = new [] { typeof(string) })] + string CrossSiteAccessPolicyCrossDomainPolicy { get; set; } + /// A description for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the live event.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks + /// of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame + /// interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment + /// duration defaults to 2 seconds. The value cannot be set for pass-through live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment duration defaults to 2 seconds. The value cannot be set for pass-through live events.", + SerializedName = @"keyFrameInterval", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? EncodingKeyFrameInterval { get; set; } + /// + /// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot + /// be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType + /// is set to Premium1080p, the default preset is ‘Default1080p’. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType is set to Premium1080p, the default preset is ‘Default1080p’.", + SerializedName = @"presetName", + PossibleTypes = new [] { typeof(string) })] + string EncodingPresetName { get; set; } + /// + /// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies how the input video will be resized to fit the desired output resolution(s). Default is None", + SerializedName = @"stretchMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? EncodingStretchMode { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"encodingType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? EncodingType { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"hostnamePrefix", + PossibleTypes = new [] { typeof(string) })] + string HostnamePrefix { get; set; } + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] InputAccessControlIPAllow { get; set; } + /// + /// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If + /// omitted, the service will generate a unique value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If omitted, the service will generate a unique value.", + SerializedName = @"accessToken", + PossibleTypes = new [] { typeof(string) })] + string InputAccessToken { get; set; } + /// The input endpoints for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The input endpoints for the live event.", + SerializedName = @"endpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] InputEndpoint { get; set; } + /// + /// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property + /// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events.", + SerializedName = @"keyFrameIntervalDuration", + PossibleTypes = new [] { typeof(string) })] + string InputKeyFrameIntervalDuration { get; set; } + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The input protocol for the live event. This is specified at creation time and cannot be updated.", + SerializedName = @"streamingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol? InputStreamingProtocol { get; set; } + /// The last modified time of the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The last modified time of the live event.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] PreviewAccessControlIPAllow { get; set; } + /// + /// An alternative media identifier associated with the streaming locator created for the preview. This value is specified + /// at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate + /// of the StreamingPolicy specified in the StreamingPolicyName field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An alternative media identifier associated with the streaming locator created for the preview. This value is specified at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the StreamingPolicyName field.", + SerializedName = @"alternativeMediaId", + PossibleTypes = new [] { typeof(string) })] + string PreviewAlternativeMediaId { get; set; } + /// + /// The endpoints for preview. Do not share the preview URL with the live event audience. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The endpoints for preview. Do not share the preview URL with the live event audience.", + SerializedName = @"endpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] PreviewEndpoint { get; set; } + /// + /// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview + /// locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot + /// be updated once the live event is created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot be updated once the live event is created.", + SerializedName = @"previewLocator", + PossibleTypes = new [] { typeof(string) })] + string PreviewLocator { get; set; } + /// + /// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated.", + SerializedName = @"streamingPolicyName", + PossibleTypes = new [] { typeof(string) })] + string PreviewStreamingPolicyName { get; set; } + /// The provisioning state of the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the live event.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// + /// The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState? ResourceState { get; } + /// + /// 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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'.", + SerializedName = @"streamOptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag[] StreamOption { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information + /// about the live transcription feature. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature.", + SerializedName = @"transcriptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription[] Transcription { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"useStaticHostname", + PossibleTypes = new [] { typeof(bool) })] + bool? UseStaticHostname { get; set; } + + } + /// The live event. + internal partial interface ILiveEventInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal + { + /// The creation time for the live event + global::System.DateTime? Created { get; set; } + /// Live event cross site access policies. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies CrossSiteAccessPolicy { get; set; } + /// The content of clientaccesspolicy.xml used by Silverlight. + string CrossSiteAccessPolicyClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + string CrossSiteAccessPolicyCrossDomainPolicy { get; set; } + /// A description for the live event. + string Description { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding Encoding { get; set; } + /// + /// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks + /// of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame + /// interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment + /// duration defaults to 2 seconds. The value cannot be set for pass-through live events. + /// + global::System.TimeSpan? EncodingKeyFrameInterval { get; set; } + /// + /// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot + /// be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType + /// is set to Premium1080p, the default preset is ‘Default1080p’. + /// + string EncodingPresetName { get; set; } + /// + /// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? EncodingStretchMode { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? EncodingType { get; set; } + /// + /// 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. + /// + string HostnamePrefix { get; set; } + /// + /// Live event input settings. It defines how the live event receives input from a contribution encoder. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput Input { get; set; } + /// Access control for live event input. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl InputAccessControl { get; set; } + /// The IP access control properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl InputAccessControlIP { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] InputAccessControlIPAllow { get; set; } + /// + /// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If + /// omitted, the service will generate a unique value. + /// + string InputAccessToken { get; set; } + /// The input endpoints for the live event. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] InputEndpoint { get; set; } + /// + /// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property + /// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. + /// + string InputKeyFrameIntervalDuration { get; set; } + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol? InputStreamingProtocol { get; set; } + /// The last modified time of the live event. + global::System.DateTime? LastModified { get; set; } + /// + /// Live event preview settings. Preview allows live event producers to preview the live streaming content without creating + /// any live output. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview Preview { get; set; } + /// The access control for live event preview. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl PreviewAccessControl { get; set; } + /// The IP access control properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl PreviewAccessControlIP { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] PreviewAccessControlIPAllow { get; set; } + /// + /// An alternative media identifier associated with the streaming locator created for the preview. This value is specified + /// at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate + /// of the StreamingPolicy specified in the StreamingPolicyName field. + /// + string PreviewAlternativeMediaId { get; set; } + /// + /// The endpoints for preview. Do not share the preview URL with the live event audience. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] PreviewEndpoint { get; set; } + /// + /// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview + /// locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot + /// be updated once the live event is created. + /// + string PreviewLocator { get; set; } + /// + /// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated. + /// + string PreviewStreamingPolicyName { get; set; } + /// The live event properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventProperties Property { get; set; } + /// The provisioning state of the live event. + string ProvisioningState { get; set; } + /// + /// The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState? ResourceState { get; set; } + /// + /// 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'. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag[] StreamOption { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information + /// about the live transcription feature. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription[] Transcription { get; set; } + /// + /// 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 + /// + bool? UseStaticHostname { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEvent.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEvent.json.cs new file mode 100644 index 000000000000..6e1a0acbf800 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEvent.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The live event. + public partial class LiveEvent + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEvent(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEvent(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventActionInput.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventActionInput.cs new file mode 100644 index 000000000000..4d5554167bc4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventActionInput.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The LiveEvent action input parameter definition. + public partial class LiveEventActionInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventActionInput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventActionInputInternal + { + + /// Backing field for property. + private bool? _removeOutputsOnStop; + + /// + /// The flag indicates whether live outputs are automatically deleted when live event is being stopped. Deleting live outputs + /// do not delete the underlying assets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? RemoveOutputsOnStop { get => this._removeOutputsOnStop; set => this._removeOutputsOnStop = value; } + + /// Creates an new instance. + public LiveEventActionInput() + { + + } + } + /// The LiveEvent action input parameter definition. + public partial interface ILiveEventActionInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The flag indicates whether live outputs are automatically deleted when live event is being stopped. Deleting live outputs + /// do not delete the underlying assets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The flag indicates whether live outputs are automatically deleted when live event is being stopped. Deleting live outputs do not delete the underlying assets.", + SerializedName = @"removeOutputsOnStop", + PossibleTypes = new [] { typeof(bool) })] + bool? RemoveOutputsOnStop { get; set; } + + } + /// The LiveEvent action input parameter definition. + internal partial interface ILiveEventActionInputInternal + + { + /// + /// The flag indicates whether live outputs are automatically deleted when live event is being stopped. Deleting live outputs + /// do not delete the underlying assets. + /// + bool? RemoveOutputsOnStop { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventActionInput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventActionInput.json.cs new file mode 100644 index 000000000000..5593e6610f9e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventActionInput.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The LiveEvent action input parameter definition. + public partial class LiveEventActionInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventActionInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventActionInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventActionInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventActionInput(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventActionInput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_removeOutputsOnStop = If( json?.PropertyT("removeOutputsOnStop"), out var __jsonRemoveOutputsOnStop) ? (bool?)__jsonRemoveOutputsOnStop : RemoveOutputsOnStop;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._removeOutputsOnStop ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._removeOutputsOnStop) : null, "removeOutputsOnStop" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEncoding.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEncoding.cs new file mode 100644 index 000000000000..6135e0499e26 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEncoding.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Specifies the live event type and optional encoding settings for encoding live events. + /// + public partial class LiveEventEncoding : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncodingInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? _encodingType; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? EncodingType { get => this._encodingType; set => this._encodingType = value; } + + /// Backing field for property. + private global::System.TimeSpan? _keyFrameInterval; + + /// + /// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks + /// of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame + /// interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment + /// duration defaults to 2 seconds. The value cannot be set for pass-through live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? KeyFrameInterval { get => this._keyFrameInterval; set => this._keyFrameInterval = value; } + + /// Backing field for property. + private string _presetName; + + /// + /// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot + /// be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType + /// is set to Premium1080p, the default preset is ‘Default1080p’. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PresetName { get => this._presetName; set => this._presetName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? _stretchMode; + + /// + /// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get => this._stretchMode; set => this._stretchMode = value; } + + /// Creates an new instance. + public LiveEventEncoding() + { + + } + } + /// Specifies the live event type and optional encoding settings for encoding live events. + public partial interface ILiveEventEncoding : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"encodingType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? EncodingType { get; set; } + /// + /// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks + /// of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame + /// interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment + /// duration defaults to 2 seconds. The value cannot be set for pass-through live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment duration defaults to 2 seconds. The value cannot be set for pass-through live events.", + SerializedName = @"keyFrameInterval", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? KeyFrameInterval { get; set; } + /// + /// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot + /// be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType + /// is set to Premium1080p, the default preset is ‘Default1080p’. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType is set to Premium1080p, the default preset is ‘Default1080p’.", + SerializedName = @"presetName", + PossibleTypes = new [] { typeof(string) })] + string PresetName { get; set; } + /// + /// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies how the input video will be resized to fit the desired output resolution(s). Default is None", + SerializedName = @"stretchMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get; set; } + + } + /// Specifies the live event type and optional encoding settings for encoding live events. + internal partial interface ILiveEventEncodingInternal + + { + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? EncodingType { get; set; } + /// + /// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks + /// of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame + /// interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment + /// duration defaults to 2 seconds. The value cannot be set for pass-through live events. + /// + global::System.TimeSpan? KeyFrameInterval { get; set; } + /// + /// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot + /// be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType + /// is set to Premium1080p, the default preset is ‘Default1080p’. + /// + string PresetName { get; set; } + /// + /// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? StretchMode { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEncoding.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEncoding.json.cs new file mode 100644 index 000000000000..913d661dc2c5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEncoding.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Specifies the live event type and optional encoding settings for encoding live events. + /// + public partial class LiveEventEncoding + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventEncoding(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventEncoding(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_encodingType = If( json?.PropertyT("encodingType"), out var __jsonEncodingType) ? (string)__jsonEncodingType : (string)EncodingType;} + {_presetName = If( json?.PropertyT("presetName"), out var __jsonPresetName) ? (string)__jsonPresetName : (string)PresetName;} + {_stretchMode = If( json?.PropertyT("stretchMode"), out var __jsonStretchMode) ? (string)__jsonStretchMode : (string)StretchMode;} + {_keyFrameInterval = If( json?.PropertyT("keyFrameInterval"), out var __jsonKeyFrameInterval) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonKeyFrameInterval ) : KeyFrameInterval;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._encodingType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._encodingType.ToString()) : null, "encodingType" ,container.Add ); + AddIf( null != (((object)this._presetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._presetName.ToString()) : null, "presetName" ,container.Add ); + AddIf( null != (((object)this._stretchMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._stretchMode.ToString()) : null, "stretchMode" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._keyFrameInterval ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._keyFrameInterval)): null), "keyFrameInterval" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEndpoint.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEndpoint.cs new file mode 100644 index 000000000000..f71b9146bdc3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEndpoint.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The live event endpoint. + public partial class LiveEventEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpointInternal + { + + /// Backing field for property. + private string _protocol; + + /// The endpoint protocol. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Protocol { get => this._protocol; set => this._protocol = value; } + + /// Backing field for property. + private string _url; + + /// The endpoint URL. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Url { get => this._url; set => this._url = value; } + + /// Creates an new instance. + public LiveEventEndpoint() + { + + } + } + /// The live event endpoint. + public partial interface ILiveEventEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The endpoint protocol. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The endpoint protocol.", + SerializedName = @"protocol", + PossibleTypes = new [] { typeof(string) })] + string Protocol { get; set; } + /// The endpoint URL. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The endpoint URL.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string Url { get; set; } + + } + /// The live event endpoint. + internal partial interface ILiveEventEndpointInternal + + { + /// The endpoint protocol. + string Protocol { get; set; } + /// The endpoint URL. + string Url { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEndpoint.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEndpoint.json.cs new file mode 100644 index 000000000000..a6578029615c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventEndpoint.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The live event endpoint. + public partial class LiveEventEndpoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventEndpoint(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventEndpoint(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_protocol = If( json?.PropertyT("protocol"), out var __jsonProtocol) ? (string)__jsonProtocol : (string)Protocol;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._protocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._protocol.ToString()) : null, "protocol" ,container.Add ); + AddIf( null != (((object)this._url)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._url.ToString()) : null, "url" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInput.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInput.cs new file mode 100644 index 000000000000..d4eee6f529dd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInput.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The live event input. + public partial class LiveEventInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl _accessControl; + + /// Access control for live event input. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl AccessControl { get => (this._accessControl = this._accessControl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventInputAccessControl()); set => this._accessControl = value; } + + /// Backing field for property. + private string _accessToken; + + /// + /// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If + /// omitted, the service will generate a unique value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AccessToken { get => this._accessToken; set => this._accessToken = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] _endpoint; + + /// The input endpoints for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControlInternal)AccessControl).IPAllow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControlInternal)AccessControl).IPAllow = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _keyFrameIntervalDuration; + + /// + /// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property + /// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string KeyFrameIntervalDuration { get => this._keyFrameIntervalDuration; set => this._keyFrameIntervalDuration = value; } + + /// Internal Acessors for AccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal.AccessControl { get => (this._accessControl = this._accessControl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventInputAccessControl()); set { {_accessControl = value;} } } + + /// Internal Acessors for AccessControlIP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal.AccessControlIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControlInternal)AccessControl).IP; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControlInternal)AccessControl).IP = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol _streamingProtocol; + + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol StreamingProtocol { get => this._streamingProtocol; set => this._streamingProtocol = value; } + + /// Creates an new instance. + public LiveEventInput() + { + + } + } + /// The live event input. + public partial interface ILiveEventInput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If + /// omitted, the service will generate a unique value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If omitted, the service will generate a unique value.", + SerializedName = @"accessToken", + PossibleTypes = new [] { typeof(string) })] + string AccessToken { get; set; } + /// The input endpoints for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The input endpoints for the live event.", + SerializedName = @"endpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] Endpoint { get; set; } + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + /// + /// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property + /// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events.", + SerializedName = @"keyFrameIntervalDuration", + PossibleTypes = new [] { typeof(string) })] + string KeyFrameIntervalDuration { get; set; } + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The input protocol for the live event. This is specified at creation time and cannot be updated.", + SerializedName = @"streamingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol StreamingProtocol { get; set; } + + } + /// The live event input. + internal partial interface ILiveEventInputInternal + + { + /// Access control for live event input. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl AccessControl { get; set; } + /// The IP access control properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl AccessControlIP { get; set; } + /// + /// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If + /// omitted, the service will generate a unique value. + /// + string AccessToken { get; set; } + /// The input endpoints for the live event. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] Endpoint { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + /// + /// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property + /// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. + /// + string KeyFrameIntervalDuration { get; set; } + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol StreamingProtocol { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInput.json.cs new file mode 100644 index 000000000000..0a4a53e13206 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInput.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The live event input. + public partial class LiveEventInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventInput(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventInput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_accessControl = If( json?.PropertyT("accessControl"), out var __jsonAccessControl) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventInputAccessControl.FromJson(__jsonAccessControl) : AccessControl;} + {_streamingProtocol = If( json?.PropertyT("streamingProtocol"), out var __jsonStreamingProtocol) ? (string)__jsonStreamingProtocol : (string)StreamingProtocol;} + {_keyFrameIntervalDuration = If( json?.PropertyT("keyFrameIntervalDuration"), out var __jsonKeyFrameIntervalDuration) ? (string)__jsonKeyFrameIntervalDuration : (string)KeyFrameIntervalDuration;} + {_accessToken = If( json?.PropertyT("accessToken"), out var __jsonAccessToken) ? (string)__jsonAccessToken : (string)AccessToken;} + {_endpoint = If( json?.PropertyT("endpoints"), out var __jsonEndpoints) ? If( __jsonEndpoints as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventEndpoint.FromJson(__u) )) ))() : null : Endpoint;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._accessControl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._accessControl.ToJson(null,serializationMode) : null, "accessControl" ,container.Add ); + AddIf( null != (((object)this._streamingProtocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingProtocol.ToString()) : null, "streamingProtocol" ,container.Add ); + AddIf( null != (((object)this._keyFrameIntervalDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._keyFrameIntervalDuration.ToString()) : null, "keyFrameIntervalDuration" ,container.Add ); + AddIf( null != (((object)this._accessToken)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._accessToken.ToString()) : null, "accessToken" ,container.Add ); + if (null != this._endpoint) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._endpoint ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("endpoints",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputAccessControl.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputAccessControl.cs new file mode 100644 index 000000000000..7c6b8549cc05 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputAccessControl.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The IP access control for live event input. + public partial class LiveEventInputAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControlInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl _iP; + + /// The IP access control properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl IP { get => (this._iP = this._iP ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPAccessControl()); set => this._iP = value; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControlInternal)IP).Allow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControlInternal)IP).Allow = value ?? null /* arrayOf */; } + + /// Internal Acessors for IP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControlInternal.IP { get => (this._iP = this._iP ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPAccessControl()); set { {_iP = value;} } } + + /// Creates an new instance. + public LiveEventInputAccessControl() + { + + } + } + /// The IP access control for live event input. + public partial interface ILiveEventInputAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + + } + /// The IP access control for live event input. + internal partial interface ILiveEventInputAccessControlInternal + + { + /// The IP access control properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl IP { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputAccessControl.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputAccessControl.json.cs new file mode 100644 index 000000000000..c39dc4aee0d4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputAccessControl.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The IP access control for live event input. + public partial class LiveEventInputAccessControl + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventInputAccessControl(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventInputAccessControl(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_iP = If( json?.PropertyT("ip"), out var __jsonIP) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPAccessControl.FromJson(__jsonIP) : IP;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._iP ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._iP.ToJson(null,serializationMode) : null, "ip" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputTrackSelection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputTrackSelection.cs new file mode 100644 index 000000000000..f5aca32af64c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputTrackSelection.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A track selection condition. This property is reserved for future use, any value set on this property will be ignored. + /// + public partial class LiveEventInputTrackSelection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelectionInternal + { + + /// Backing field for property. + private string _operation; + + /// + /// Comparing operation. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Operation { get => this._operation; set => this._operation = value; } + + /// Backing field for property. + private string _property; + + /// + /// Property name to select. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Property { get => this._property; set => this._property = value; } + + /// Backing field for property. + private string _value; + + /// + /// Property value to select. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public LiveEventInputTrackSelection() + { + + } + } + /// A track selection condition. This property is reserved for future use, any value set on this property will be ignored. + public partial interface ILiveEventInputTrackSelection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Comparing operation. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Comparing operation. This property is reserved for future use, any value set on this property will be ignored.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; set; } + /// + /// Property name to select. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Property name to select. This property is reserved for future use, any value set on this property will be ignored.", + SerializedName = @"property", + PossibleTypes = new [] { typeof(string) })] + string Property { get; set; } + /// + /// Property value to select. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Property value to select. This property is reserved for future use, any value set on this property will be ignored.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// A track selection condition. This property is reserved for future use, any value set on this property will be ignored. + internal partial interface ILiveEventInputTrackSelectionInternal + + { + /// + /// Comparing operation. This property is reserved for future use, any value set on this property will be ignored. + /// + string Operation { get; set; } + /// + /// Property name to select. This property is reserved for future use, any value set on this property will be ignored. + /// + string Property { get; set; } + /// + /// Property value to select. This property is reserved for future use, any value set on this property will be ignored. + /// + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputTrackSelection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputTrackSelection.json.cs new file mode 100644 index 000000000000..3fa742c71b1d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventInputTrackSelection.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// A track selection condition. This property is reserved for future use, any value set on this property will be ignored. + /// + public partial class LiveEventInputTrackSelection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventInputTrackSelection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventInputTrackSelection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("property"), out var __jsonProperty) ? (string)__jsonProperty : (string)Property;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._property)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._property.ToString()) : null, "property" ,container.Add ); + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventListResult.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventListResult.cs new file mode 100644 index 000000000000..de55f017a177 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventListResult.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The LiveEvent list result. + public partial class LiveEventListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventListResult, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventListResultInternal + { + + /// Backing field for property. + private int? _odataCount; + + /// The number of result. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? OdataCount { get => this._odataCount; set => this._odataCount = value; } + + /// Backing field for property. + private string _odataNextLink; + + /// + /// The link to the next set of results. Not empty if value contains incomplete list of live outputs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent[] _value; + + /// The result of the List Live Event operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public LiveEventListResult() + { + + } + } + /// The LiveEvent list result. + public partial interface ILiveEventListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The number of result. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result.", + SerializedName = @"@odata.count", + PossibleTypes = new [] { typeof(int) })] + int? OdataCount { get; set; } + /// + /// The link to the next set of results. Not empty if value contains incomplete list of live outputs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next set of results. Not empty if value contains incomplete list of live outputs.", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// The result of the List Live Event operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The result of the List Live Event operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent[] Value { get; set; } + + } + /// The LiveEvent list result. + internal partial interface ILiveEventListResultInternal + + { + /// The number of result. + int? OdataCount { get; set; } + /// + /// The link to the next set of results. Not empty if value contains incomplete list of live outputs. + /// + string OdataNextLink { get; set; } + /// The result of the List Live Event operation. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventListResult.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventListResult.json.cs new file mode 100644 index 000000000000..636c837fa5cd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventListResult.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The LiveEvent list result. + public partial class LiveEventListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventListResult(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEvent) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEvent.FromJson(__u) )) ))() : null : Value;} + {_odataCount = If( json?.PropertyT("@odata.count"), out var __jsonOdataCount) ? (int?)__jsonOdataCount : OdataCount;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != this._odataCount ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._odataCount) : null, "@odata.count" ,container.Add ); + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventOutputTranscriptionTrack.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventOutputTranscriptionTrack.cs new file mode 100644 index 000000000000..d8519651ef03 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventOutputTranscriptionTrack.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + /// + public partial class LiveEventOutputTranscriptionTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrack, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrackInternal + { + + /// Backing field for property. + private string _trackName; + + /// + /// The output track name. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string TrackName { get => this._trackName; set => this._trackName = value; } + + /// Creates an new instance. + public LiveEventOutputTranscriptionTrack() + { + + } + } + /// Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + public partial interface ILiveEventOutputTranscriptionTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// The output track name. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The output track name. This property is reserved for future use, any value set on this property will be ignored.", + SerializedName = @"trackName", + PossibleTypes = new [] { typeof(string) })] + string TrackName { get; set; } + + } + /// Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + internal partial interface ILiveEventOutputTranscriptionTrackInternal + + { + /// + /// The output track name. This property is reserved for future use, any value set on this property will be ignored. + /// + string TrackName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventOutputTranscriptionTrack.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventOutputTranscriptionTrack.json.cs new file mode 100644 index 000000000000..12d5286d8d71 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventOutputTranscriptionTrack.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + /// + public partial class LiveEventOutputTranscriptionTrack + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrack. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrack. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrack FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventOutputTranscriptionTrack(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventOutputTranscriptionTrack(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_trackName = If( json?.PropertyT("trackName"), out var __jsonTrackName) ? (string)__jsonTrackName : (string)TrackName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._trackName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._trackName.ToString()) : null, "trackName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreview.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreview.cs new file mode 100644 index 000000000000..6f412ca16996 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreview.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Live event preview settings. + public partial class LiveEventPreview : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl _accessControl; + + /// The access control for live event preview. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl AccessControl { get => (this._accessControl = this._accessControl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventPreviewAccessControl()); set => this._accessControl = value; } + + /// Backing field for property. + private string _alternativeMediaId; + + /// + /// An alternative media identifier associated with the streaming locator created for the preview. This value is specified + /// at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate + /// of the StreamingPolicy specified in the StreamingPolicyName field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AlternativeMediaId { get => this._alternativeMediaId; set => this._alternativeMediaId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] _endpoint; + + /// + /// The endpoints for preview. Do not share the preview URL with the live event audience. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControlInternal)AccessControl).IPAllow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControlInternal)AccessControl).IPAllow = value ?? null /* arrayOf */; } + + /// Internal Acessors for AccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal.AccessControl { get => (this._accessControl = this._accessControl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventPreviewAccessControl()); set { {_accessControl = value;} } } + + /// Internal Acessors for AccessControlIP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal.AccessControlIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControlInternal)AccessControl).IP; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControlInternal)AccessControl).IP = value; } + + /// Backing field for property. + private string _previewLocator; + + /// + /// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview + /// locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot + /// be updated once the live event is created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PreviewLocator { get => this._previewLocator; set => this._previewLocator = value; } + + /// Backing field for property. + private string _streamingPolicyName; + + /// + /// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string StreamingPolicyName { get => this._streamingPolicyName; set => this._streamingPolicyName = value; } + + /// Creates an new instance. + public LiveEventPreview() + { + + } + } + /// Live event preview settings. + public partial interface ILiveEventPreview : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// An alternative media identifier associated with the streaming locator created for the preview. This value is specified + /// at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate + /// of the StreamingPolicy specified in the StreamingPolicyName field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An alternative media identifier associated with the streaming locator created for the preview. This value is specified at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the StreamingPolicyName field.", + SerializedName = @"alternativeMediaId", + PossibleTypes = new [] { typeof(string) })] + string AlternativeMediaId { get; set; } + /// + /// The endpoints for preview. Do not share the preview URL with the live event audience. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The endpoints for preview. Do not share the preview URL with the live event audience.", + SerializedName = @"endpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] Endpoint { get; set; } + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + /// + /// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview + /// locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot + /// be updated once the live event is created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot be updated once the live event is created.", + SerializedName = @"previewLocator", + PossibleTypes = new [] { typeof(string) })] + string PreviewLocator { get; set; } + /// + /// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated.", + SerializedName = @"streamingPolicyName", + PossibleTypes = new [] { typeof(string) })] + string StreamingPolicyName { get; set; } + + } + /// Live event preview settings. + internal partial interface ILiveEventPreviewInternal + + { + /// The access control for live event preview. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl AccessControl { get; set; } + /// The IP access control properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl AccessControlIP { get; set; } + /// + /// An alternative media identifier associated with the streaming locator created for the preview. This value is specified + /// at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate + /// of the StreamingPolicy specified in the StreamingPolicyName field. + /// + string AlternativeMediaId { get; set; } + /// + /// The endpoints for preview. Do not share the preview URL with the live event audience. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] Endpoint { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + /// + /// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview + /// locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot + /// be updated once the live event is created. + /// + string PreviewLocator { get; set; } + /// + /// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated. + /// + string StreamingPolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreview.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreview.json.cs new file mode 100644 index 000000000000..47bdaf0038ac --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreview.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Live event preview settings. + public partial class LiveEventPreview + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventPreview(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventPreview(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_accessControl = If( json?.PropertyT("accessControl"), out var __jsonAccessControl) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventPreviewAccessControl.FromJson(__jsonAccessControl) : AccessControl;} + {_endpoint = If( json?.PropertyT("endpoints"), out var __jsonEndpoints) ? If( __jsonEndpoints as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventEndpoint.FromJson(__u) )) ))() : null : Endpoint;} + {_previewLocator = If( json?.PropertyT("previewLocator"), out var __jsonPreviewLocator) ? (string)__jsonPreviewLocator : (string)PreviewLocator;} + {_streamingPolicyName = If( json?.PropertyT("streamingPolicyName"), out var __jsonStreamingPolicyName) ? (string)__jsonStreamingPolicyName : (string)StreamingPolicyName;} + {_alternativeMediaId = If( json?.PropertyT("alternativeMediaId"), out var __jsonAlternativeMediaId) ? (string)__jsonAlternativeMediaId : (string)AlternativeMediaId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._accessControl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._accessControl.ToJson(null,serializationMode) : null, "accessControl" ,container.Add ); + if (null != this._endpoint) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._endpoint ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("endpoints",__w); + } + AddIf( null != (((object)this._previewLocator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._previewLocator.ToString()) : null, "previewLocator" ,container.Add ); + AddIf( null != (((object)this._streamingPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingPolicyName.ToString()) : null, "streamingPolicyName" ,container.Add ); + AddIf( null != (((object)this._alternativeMediaId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._alternativeMediaId.ToString()) : null, "alternativeMediaId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreviewAccessControl.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreviewAccessControl.cs new file mode 100644 index 000000000000..452eb9241a5f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreviewAccessControl.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The IP access control for the live event preview endpoint. + public partial class LiveEventPreviewAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControlInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl _iP; + + /// The IP access control properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl IP { get => (this._iP = this._iP ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPAccessControl()); set => this._iP = value; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControlInternal)IP).Allow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControlInternal)IP).Allow = value ?? null /* arrayOf */; } + + /// Internal Acessors for IP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControlInternal.IP { get => (this._iP = this._iP ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPAccessControl()); set { {_iP = value;} } } + + /// Creates an new instance. + public LiveEventPreviewAccessControl() + { + + } + } + /// The IP access control for the live event preview endpoint. + public partial interface ILiveEventPreviewAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + + } + /// The IP access control for the live event preview endpoint. + internal partial interface ILiveEventPreviewAccessControlInternal + + { + /// The IP access control properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl IP { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreviewAccessControl.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreviewAccessControl.json.cs new file mode 100644 index 000000000000..f38f0623f906 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventPreviewAccessControl.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The IP access control for the live event preview endpoint. + public partial class LiveEventPreviewAccessControl + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventPreviewAccessControl(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventPreviewAccessControl(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_iP = If( json?.PropertyT("ip"), out var __jsonIP) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPAccessControl.FromJson(__jsonIP) : IP;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._iP ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._iP.ToJson(null,serializationMode) : null, "ip" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventProperties.cs new file mode 100644 index 000000000000..b24be734b553 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventProperties.cs @@ -0,0 +1,660 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The live event properties. + public partial class LiveEventProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal + { + + /// Backing field for property. + private global::System.DateTime? _created; + + /// The creation time for the live event + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies _crossSiteAccessPolicy; + + /// Live event cross site access policies. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies CrossSiteAccessPolicy { get => (this._crossSiteAccessPolicy = this._crossSiteAccessPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CrossSiteAccessPolicies()); set => this._crossSiteAccessPolicy = value; } + + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CrossSiteAccessPolicyClientAccessPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPoliciesInternal)CrossSiteAccessPolicy).ClientAccessPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPoliciesInternal)CrossSiteAccessPolicy).ClientAccessPolicy = value ?? null; } + + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CrossSiteAccessPolicyCrossDomainPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPoliciesInternal)CrossSiteAccessPolicy).CrossDomainPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPoliciesInternal)CrossSiteAccessPolicy).CrossDomainPolicy = value ?? null; } + + /// Backing field for property. + private string _description; + + /// A description for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding _encoding; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding Encoding { get => (this._encoding = this._encoding ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventEncoding()); set => this._encoding = value; } + + /// + /// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks + /// of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame + /// interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment + /// duration defaults to 2 seconds. The value cannot be set for pass-through live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.TimeSpan? EncodingKeyFrameInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncodingInternal)Encoding).KeyFrameInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncodingInternal)Encoding).KeyFrameInterval = value ?? default(global::System.TimeSpan); } + + /// + /// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot + /// be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType + /// is set to Premium1080p, the default preset is ‘Default1080p’. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EncodingPresetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncodingInternal)Encoding).PresetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncodingInternal)Encoding).PresetName = value ?? null; } + + /// + /// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? EncodingStretchMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncodingInternal)Encoding).StretchMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncodingInternal)Encoding).StretchMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? EncodingType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncodingInternal)Encoding).EncodingType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncodingInternal)Encoding).EncodingType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType)""); } + + /// Backing field for property. + private string _hostnamePrefix; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string HostnamePrefix { get => this._hostnamePrefix; set => this._hostnamePrefix = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput _input; + + /// + /// Live event input settings. It defines how the live event receives input from a contribution encoder. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventInput()); set => this._input = value; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] InputAccessControlIPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).IPAllow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).IPAllow = value ?? null /* arrayOf */; } + + /// + /// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If + /// omitted, the service will generate a unique value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string InputAccessToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).AccessToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).AccessToken = value ?? null; } + + /// The input endpoints for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] InputEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).Endpoint = value ?? null /* arrayOf */; } + + /// + /// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property + /// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string InputKeyFrameIntervalDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).KeyFrameIntervalDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).KeyFrameIntervalDuration = value ?? null; } + + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol InputStreamingProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).StreamingProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).StreamingProtocol = value ; } + + /// Backing field for property. + private global::System.DateTime? _lastModified; + + /// The last modified time of the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? LastModified { get => this._lastModified; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.Created { get => this._created; set { {_created = value;} } } + + /// Internal Acessors for CrossSiteAccessPolicy + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.CrossSiteAccessPolicy { get => (this._crossSiteAccessPolicy = this._crossSiteAccessPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CrossSiteAccessPolicies()); set { {_crossSiteAccessPolicy = value;} } } + + /// Internal Acessors for Encoding + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.Encoding { get => (this._encoding = this._encoding ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventEncoding()); set { {_encoding = value;} } } + + /// Internal Acessors for Input + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventInput()); set { {_input = value;} } } + + /// Internal Acessors for InputAccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.InputAccessControl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).AccessControl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).AccessControl = value; } + + /// Internal Acessors for InputAccessControlIP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.InputAccessControlIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).AccessControlIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputInternal)Input).AccessControlIP = value; } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.LastModified { get => this._lastModified; set { {_lastModified = value;} } } + + /// Internal Acessors for Preview + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.Preview { get => (this._preview = this._preview ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventPreview()); set { {_preview = value;} } } + + /// Internal Acessors for PreviewAccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.PreviewAccessControl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).AccessControl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).AccessControl = value; } + + /// Internal Acessors for PreviewAccessControlIP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.PreviewAccessControlIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).AccessControlIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).AccessControlIP = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPropertiesInternal.ResourceState { get => this._resourceState; set { {_resourceState = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview _preview; + + /// + /// Live event preview settings. Preview allows live event producers to preview the live streaming content without creating + /// any live output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview Preview { get => (this._preview = this._preview ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventPreview()); set => this._preview = value; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] PreviewAccessControlIPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).IPAllow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).IPAllow = value ?? null /* arrayOf */; } + + /// + /// An alternative media identifier associated with the streaming locator created for the preview. This value is specified + /// at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate + /// of the StreamingPolicy specified in the StreamingPolicyName field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PreviewAlternativeMediaId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).AlternativeMediaId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).AlternativeMediaId = value ?? null; } + + /// + /// The endpoints for preview. Do not share the preview URL with the live event audience. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] PreviewEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).Endpoint = value ?? null /* arrayOf */; } + + /// + /// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview + /// locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot + /// be updated once the live event is created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PreviewLocator { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).PreviewLocator; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).PreviewLocator = value ?? null; } + + /// + /// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string PreviewStreamingPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).StreamingPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewInternal)Preview).StreamingPolicyName = value ?? null; } + + /// Backing field for property. + private string _provisioningState; + + /// The provisioning state of the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState? _resourceState; + + /// + /// The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState? ResourceState { get => this._resourceState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag[] _streamOption; + + /// + /// 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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag[] StreamOption { get => this._streamOption; set => this._streamOption = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription[] _transcription; + + /// + /// Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information + /// about the live transcription feature. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription[] Transcription { get => this._transcription; set => this._transcription = value; } + + /// Backing field for property. + private bool? _useStaticHostname; + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? UseStaticHostname { get => this._useStaticHostname; set => this._useStaticHostname = value; } + + /// Creates an new instance. + public LiveEventProperties() + { + + } + } + /// The live event properties. + public partial interface ILiveEventProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The creation time for the live event + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation time for the live event", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of clientaccesspolicy.xml used by Silverlight.", + SerializedName = @"clientAccessPolicy", + PossibleTypes = new [] { typeof(string) })] + string CrossSiteAccessPolicyClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of crossdomain.xml used by Silverlight.", + SerializedName = @"crossDomainPolicy", + PossibleTypes = new [] { typeof(string) })] + string CrossSiteAccessPolicyCrossDomainPolicy { get; set; } + /// A description for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the live event.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks + /// of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame + /// interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment + /// duration defaults to 2 seconds. The value cannot be set for pass-through live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment duration defaults to 2 seconds. The value cannot be set for pass-through live events.", + SerializedName = @"keyFrameInterval", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? EncodingKeyFrameInterval { get; set; } + /// + /// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot + /// be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType + /// is set to Premium1080p, the default preset is ‘Default1080p’. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType is set to Premium1080p, the default preset is ‘Default1080p’.", + SerializedName = @"presetName", + PossibleTypes = new [] { typeof(string) })] + string EncodingPresetName { get; set; } + /// + /// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies how the input video will be resized to fit the desired output resolution(s). Default is None", + SerializedName = @"stretchMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? EncodingStretchMode { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"encodingType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? EncodingType { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"hostnamePrefix", + PossibleTypes = new [] { typeof(string) })] + string HostnamePrefix { get; set; } + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] InputAccessControlIPAllow { get; set; } + /// + /// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If + /// omitted, the service will generate a unique value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If omitted, the service will generate a unique value.", + SerializedName = @"accessToken", + PossibleTypes = new [] { typeof(string) })] + string InputAccessToken { get; set; } + /// The input endpoints for the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The input endpoints for the live event.", + SerializedName = @"endpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] InputEndpoint { get; set; } + /// + /// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property + /// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events.", + SerializedName = @"keyFrameIntervalDuration", + PossibleTypes = new [] { typeof(string) })] + string InputKeyFrameIntervalDuration { get; set; } + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The input protocol for the live event. This is specified at creation time and cannot be updated.", + SerializedName = @"streamingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol InputStreamingProtocol { get; set; } + /// The last modified time of the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The last modified time of the live event.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] PreviewAccessControlIPAllow { get; set; } + /// + /// An alternative media identifier associated with the streaming locator created for the preview. This value is specified + /// at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate + /// of the StreamingPolicy specified in the StreamingPolicyName field. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An alternative media identifier associated with the streaming locator created for the preview. This value is specified at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the StreamingPolicyName field.", + SerializedName = @"alternativeMediaId", + PossibleTypes = new [] { typeof(string) })] + string PreviewAlternativeMediaId { get; set; } + /// + /// The endpoints for preview. Do not share the preview URL with the live event audience. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The endpoints for preview. Do not share the preview URL with the live event audience.", + SerializedName = @"endpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] PreviewEndpoint { get; set; } + /// + /// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview + /// locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot + /// be updated once the live event is created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot be updated once the live event is created.", + SerializedName = @"previewLocator", + PossibleTypes = new [] { typeof(string) })] + string PreviewLocator { get; set; } + /// + /// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated.", + SerializedName = @"streamingPolicyName", + PossibleTypes = new [] { typeof(string) })] + string PreviewStreamingPolicyName { get; set; } + /// The provisioning state of the live event. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the live event.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// + /// The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState? ResourceState { get; } + /// + /// 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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'.", + SerializedName = @"streamOptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag[] StreamOption { get; set; } + /// + /// Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information + /// about the live transcription feature. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature.", + SerializedName = @"transcriptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription[] Transcription { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"useStaticHostname", + PossibleTypes = new [] { typeof(bool) })] + bool? UseStaticHostname { get; set; } + + } + /// The live event properties. + internal partial interface ILiveEventPropertiesInternal + + { + /// The creation time for the live event + global::System.DateTime? Created { get; set; } + /// Live event cross site access policies. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies CrossSiteAccessPolicy { get; set; } + /// The content of clientaccesspolicy.xml used by Silverlight. + string CrossSiteAccessPolicyClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + string CrossSiteAccessPolicyCrossDomainPolicy { get; set; } + /// A description for the live event. + string Description { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEncoding Encoding { get; set; } + /// + /// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks + /// of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame + /// interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment + /// duration defaults to 2 seconds. The value cannot be set for pass-through live events. + /// + global::System.TimeSpan? EncodingKeyFrameInterval { get; set; } + /// + /// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot + /// be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType + /// is set to Premium1080p, the default preset is ‘Default1080p’. + /// + string EncodingPresetName { get; set; } + /// + /// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode? EncodingStretchMode { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType? EncodingType { get; set; } + /// + /// 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. + /// + string HostnamePrefix { get; set; } + /// + /// Live event input settings. It defines how the live event receives input from a contribution encoder. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInput Input { get; set; } + /// Access control for live event input. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputAccessControl InputAccessControl { get; set; } + /// The IP access control properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl InputAccessControlIP { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] InputAccessControlIPAllow { get; set; } + /// + /// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If + /// omitted, the service will generate a unique value. + /// + string InputAccessToken { get; set; } + /// The input endpoints for the live event. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] InputEndpoint { get; set; } + /// + /// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property + /// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. + /// + string InputKeyFrameIntervalDuration { get; set; } + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol InputStreamingProtocol { get; set; } + /// The last modified time of the live event. + global::System.DateTime? LastModified { get; set; } + /// + /// Live event preview settings. Preview allows live event producers to preview the live streaming content without creating + /// any live output. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreview Preview { get; set; } + /// The access control for live event preview. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventPreviewAccessControl PreviewAccessControl { get; set; } + /// The IP access control properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl PreviewAccessControlIP { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] PreviewAccessControlIPAllow { get; set; } + /// + /// An alternative media identifier associated with the streaming locator created for the preview. This value is specified + /// at creation time and cannot be updated. The identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate + /// of the StreamingPolicy specified in the StreamingPolicyName field. + /// + string PreviewAlternativeMediaId { get; set; } + /// + /// The endpoints for preview. Do not share the preview URL with the live event audience. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventEndpoint[] PreviewEndpoint { get; set; } + /// + /// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview + /// locator url before the event is created. If omitted, the service will generate a random identifier. This value cannot + /// be updated once the live event is created. + /// + string PreviewLocator { get; set; } + /// + /// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated. + /// + string PreviewStreamingPolicyName { get; set; } + /// The provisioning state of the live event. + string ProvisioningState { get; set; } + /// + /// The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState? ResourceState { get; set; } + /// + /// 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'. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag[] StreamOption { get; set; } + /// + /// Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information + /// about the live transcription feature. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription[] Transcription { get; set; } + /// + /// 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 + /// + bool? UseStaticHostname { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventProperties.json.cs new file mode 100644 index 000000000000..b11a3e5c0dfd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventProperties.json.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The live event properties. + public partial class LiveEventProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_input = If( json?.PropertyT("input"), out var __jsonInput) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventInput.FromJson(__jsonInput) : Input;} + {_preview = If( json?.PropertyT("preview"), out var __jsonPreview) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventPreview.FromJson(__jsonPreview) : Preview;} + {_encoding = If( json?.PropertyT("encoding"), out var __jsonEncoding) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventEncoding.FromJson(__jsonEncoding) : Encoding;} + {_crossSiteAccessPolicy = If( json?.PropertyT("crossSiteAccessPolicies"), out var __jsonCrossSiteAccessPolicies) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CrossSiteAccessPolicies.FromJson(__jsonCrossSiteAccessPolicies) : CrossSiteAccessPolicy;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_transcription = If( json?.PropertyT("transcriptions"), out var __jsonTranscriptions) ? If( __jsonTranscriptions as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventTranscription.FromJson(__u) )) ))() : null : Transcription;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_resourceState = If( json?.PropertyT("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState;} + {_useStaticHostname = If( json?.PropertyT("useStaticHostname"), out var __jsonUseStaticHostname) ? (bool?)__jsonUseStaticHostname : UseStaticHostname;} + {_hostnamePrefix = If( json?.PropertyT("hostnamePrefix"), out var __jsonHostnamePrefix) ? (string)__jsonHostnamePrefix : (string)HostnamePrefix;} + {_streamOption = If( json?.PropertyT("streamOptions"), out var __jsonStreamOptions) ? If( __jsonStreamOptions as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag) (__p is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag)""))) ))() : null : StreamOption;} + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_lastModified = If( json?.PropertyT("lastModified"), out var __jsonLastModified) ? global::System.DateTime.TryParse((string)__jsonLastModified, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedValue) ? __jsonLastModifiedValue : LastModified : LastModified;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._input ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._input.ToJson(null,serializationMode) : null, "input" ,container.Add ); + AddIf( null != this._preview ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._preview.ToJson(null,serializationMode) : null, "preview" ,container.Add ); + AddIf( null != this._encoding ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._encoding.ToJson(null,serializationMode) : null, "encoding" ,container.Add ); + AddIf( null != this._crossSiteAccessPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._crossSiteAccessPolicy.ToJson(null,serializationMode) : null, "crossSiteAccessPolicies" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (null != this._transcription) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._transcription ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("transcriptions",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._resourceState.ToString()) : null, "resourceState" ,container.Add ); + } + AddIf( null != this._useStaticHostname ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._useStaticHostname) : null, "useStaticHostname" ,container.Add ); + AddIf( null != (((object)this._hostnamePrefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._hostnamePrefix.ToString()) : null, "hostnamePrefix" ,container.Add ); + if (null != this._streamOption) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._streamOption ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("streamOptions",__r); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._lastModified ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModified?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModified" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventTranscription.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventTranscription.cs new file mode 100644 index 000000000000..7792945cea27 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventTranscription.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the transcription tracks in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + /// + public partial class LiveEventTranscription : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscriptionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection[] _inputTrackSelection; + + /// + /// Provides a mechanism to select the audio track in the input live feed, to which speech-to-text transcription is applied. + /// This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection[] InputTrackSelection { get => this._inputTrackSelection; set => this._inputTrackSelection = value; } + + /// Backing field for property. + private string _language; + + /// + /// Specifies the language (locale) to be used for speech-to-text transcription – it should match the spoken language in the + /// audio track. The value should be in BCP-47 format (e.g: 'en-US'). See https://go.microsoft.com/fwlink/?linkid=2133742 + /// for more information about the live transcription feature and the list of supported languages. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Language { get => this._language; set => this._language = value; } + + /// Internal Acessors for OutputTranscriptionTrack + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrack Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscriptionInternal.OutputTranscriptionTrack { get => (this._outputTranscriptionTrack = this._outputTranscriptionTrack ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventOutputTranscriptionTrack()); set { {_outputTranscriptionTrack = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrack _outputTranscriptionTrack; + + /// + /// Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrack OutputTranscriptionTrack { get => (this._outputTranscriptionTrack = this._outputTranscriptionTrack ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventOutputTranscriptionTrack()); set => this._outputTranscriptionTrack = value; } + + /// + /// The output track name. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string OutputTranscriptionTrackName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrackInternal)OutputTranscriptionTrack).TrackName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrackInternal)OutputTranscriptionTrack).TrackName = value ?? null; } + + /// Creates an new instance. + public LiveEventTranscription() + { + + } + } + /// Describes the transcription tracks in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + public partial interface ILiveEventTranscription : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Provides a mechanism to select the audio track in the input live feed, to which speech-to-text transcription is applied. + /// This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Provides a mechanism to select the audio track in the input live feed, to which speech-to-text transcription is applied. This property is reserved for future use, any value set on this property will be ignored.", + SerializedName = @"inputTrackSelection", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection[] InputTrackSelection { get; set; } + /// + /// Specifies the language (locale) to be used for speech-to-text transcription – it should match the spoken language in the + /// audio track. The value should be in BCP-47 format (e.g: 'en-US'). See https://go.microsoft.com/fwlink/?linkid=2133742 + /// for more information about the live transcription feature and the list of supported languages. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the language (locale) to be used for speech-to-text transcription – it should match the spoken language in the audio track. The value should be in BCP-47 format (e.g: 'en-US'). See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature and the list of supported languages.", + SerializedName = @"language", + PossibleTypes = new [] { typeof(string) })] + string Language { get; set; } + /// + /// The output track name. This property is reserved for future use, any value set on this property will be ignored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The output track name. This property is reserved for future use, any value set on this property will be ignored.", + SerializedName = @"trackName", + PossibleTypes = new [] { typeof(string) })] + string OutputTranscriptionTrackName { get; set; } + + } + /// Describes the transcription tracks in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + internal partial interface ILiveEventTranscriptionInternal + + { + /// + /// Provides a mechanism to select the audio track in the input live feed, to which speech-to-text transcription is applied. + /// This property is reserved for future use, any value set on this property will be ignored. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection[] InputTrackSelection { get; set; } + /// + /// Specifies the language (locale) to be used for speech-to-text transcription – it should match the spoken language in the + /// audio track. The value should be in BCP-47 format (e.g: 'en-US'). See https://go.microsoft.com/fwlink/?linkid=2133742 + /// for more information about the live transcription feature and the list of supported languages. + /// + string Language { get; set; } + /// + /// Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventOutputTranscriptionTrack OutputTranscriptionTrack { get; set; } + /// + /// The output track name. This property is reserved for future use, any value set on this property will be ignored. + /// + string OutputTranscriptionTrackName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventTranscription.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventTranscription.json.cs new file mode 100644 index 000000000000..467f77de650f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveEventTranscription.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Describes the transcription tracks in the output of a live event, generated using speech-to-text transcription. This property + /// is reserved for future use, any value set on this property will be ignored. + /// + public partial class LiveEventTranscription + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventTranscription FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveEventTranscription(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveEventTranscription(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_outputTranscriptionTrack = If( json?.PropertyT("outputTranscriptionTrack"), out var __jsonOutputTranscriptionTrack) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventOutputTranscriptionTrack.FromJson(__jsonOutputTranscriptionTrack) : OutputTranscriptionTrack;} + {_language = If( json?.PropertyT("language"), out var __jsonLanguage) ? (string)__jsonLanguage : (string)Language;} + {_inputTrackSelection = If( json?.PropertyT("inputTrackSelection"), out var __jsonInputTrackSelection) ? If( __jsonInputTrackSelection as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveEventInputTrackSelection) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveEventInputTrackSelection.FromJson(__u) )) ))() : null : InputTrackSelection;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._outputTranscriptionTrack ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._outputTranscriptionTrack.ToJson(null,serializationMode) : null, "outputTranscriptionTrack" ,container.Add ); + AddIf( null != (((object)this._language)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._language.ToString()) : null, "language" ,container.Add ); + if (null != this._inputTrackSelection) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._inputTrackSelection ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("inputTrackSelection",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutput.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutput.cs new file mode 100644 index 000000000000..34fae34e5bbd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutput.cs @@ -0,0 +1,405 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Live Output. + public partial class LiveOutput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.TimeSpan? ArchiveWindowLength { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ArchiveWindowLength; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ArchiveWindowLength = value ?? default(global::System.TimeSpan); } + + /// The asset that the live output will write to. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string AssetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).AssetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).AssetName = value ?? null; } + + /// The creation time the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).Created; } + + /// The description of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).Description = value ?? null; } + + /// + /// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not + /// affect the packing ratio for HLS CMAF output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? HlFragmentsPerTsSegment { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).HlFragmentsPerTsSegment; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).HlFragmentsPerTsSegment = value ?? default(int); } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// The time the live output was last modified. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).LastModified; } + + /// + /// The manifest file name. If not provided, the service will generate one automatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string ManifestName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ManifestName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ManifestName = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputInternal.Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).Created; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).Created = value; } + + /// Internal Acessors for Hl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputInternal.Hl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).Hl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).Hl = value; } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputInternal.LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).LastModified; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).LastModified = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveOutputProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputInternal.ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ResourceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ResourceState = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// + /// The initial timestamp that the live output will start at, any content before this value will not be archived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? OutputSnapTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).OutputSnapTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).OutputSnapTime = value ?? default(long); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputProperties _property; + + /// Live output properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveOutputProperties()); set => this._property = value; } + + /// The provisioning state of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ProvisioningState; } + + /// The resource state of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState? ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).ResourceState; } + + /// + /// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. + /// The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. + /// For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default + /// value 30m only if Live Event enables LL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.TimeSpan? RewindWindowLength { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).RewindWindowLength; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal)Property).RewindWindowLength = value ?? default(global::System.TimeSpan); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public LiveOutput() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The Live Output. + public partial interface ILiveOutput : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"archiveWindowLength", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? ArchiveWindowLength { get; set; } + /// The asset that the live output will write to. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The asset that the live output will write to.", + SerializedName = @"assetName", + PossibleTypes = new [] { typeof(string) })] + string AssetName { get; set; } + /// The creation time the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation time the live output.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// The description of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The description of the live output.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not + /// affect the packing ratio for HLS CMAF output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not affect the packing ratio for HLS CMAF output.", + SerializedName = @"fragmentsPerTsSegment", + PossibleTypes = new [] { typeof(int) })] + int? HlFragmentsPerTsSegment { get; set; } + /// The time the live output was last modified. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The time the live output was last modified.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// + /// The manifest file name. If not provided, the service will generate one automatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The manifest file name. If not provided, the service will generate one automatically.", + SerializedName = @"manifestName", + PossibleTypes = new [] { typeof(string) })] + string ManifestName { get; set; } + /// + /// The initial timestamp that the live output will start at, any content before this value will not be archived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The initial timestamp that the live output will start at, any content before this value will not be archived.", + SerializedName = @"outputSnapTime", + PossibleTypes = new [] { typeof(long) })] + long? OutputSnapTime { get; set; } + /// The provisioning state of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the live output.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// The resource state of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The resource state of the live output.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState? ResourceState { get; } + /// + /// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. + /// The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. + /// For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default + /// value 30m only if Live Event enables LL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event enables LL.", + SerializedName = @"rewindWindowLength", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? RewindWindowLength { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// The Live Output. + internal partial interface ILiveOutputInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// + /// 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. + /// + global::System.TimeSpan? ArchiveWindowLength { get; set; } + /// The asset that the live output will write to. + string AssetName { get; set; } + /// The creation time the live output. + global::System.DateTime? Created { get; set; } + /// The description of the live output. + string Description { get; set; } + /// HTTP Live Streaming (HLS) packing setting for the live output. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls Hl { get; set; } + /// + /// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not + /// affect the packing ratio for HLS CMAF output. + /// + int? HlFragmentsPerTsSegment { get; set; } + /// The time the live output was last modified. + global::System.DateTime? LastModified { get; set; } + /// + /// The manifest file name. If not provided, the service will generate one automatically. + /// + string ManifestName { get; set; } + /// + /// The initial timestamp that the live output will start at, any content before this value will not be archived. + /// + long? OutputSnapTime { get; set; } + /// Live output properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputProperties Property { get; set; } + /// The provisioning state of the live output. + string ProvisioningState { get; set; } + /// The resource state of the live output. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState? ResourceState { get; set; } + /// + /// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. + /// The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. + /// For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default + /// value 30m only if Live Event enables LL. + /// + global::System.TimeSpan? RewindWindowLength { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutput.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutput.json.cs new file mode 100644 index 000000000000..3acf762d4258 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutput.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Live Output. + public partial class LiveOutput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveOutput(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveOutput(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveOutputProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputListResult.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputListResult.cs new file mode 100644 index 000000000000..c42c4c36aedc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputListResult.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The LiveOutput list result. + public partial class LiveOutputListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputListResult, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputListResultInternal + { + + /// Backing field for property. + private int? _odataCount; + + /// The number of result. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? OdataCount { get => this._odataCount; set => this._odataCount = value; } + + /// Backing field for property. + private string _odataNextLink; + + /// + /// The link to the next set of results. Not empty if value contains incomplete list of live outputs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput[] _value; + + /// The result of the List LiveOutput operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public LiveOutputListResult() + { + + } + } + /// The LiveOutput list result. + public partial interface ILiveOutputListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The number of result. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result.", + SerializedName = @"@odata.count", + PossibleTypes = new [] { typeof(int) })] + int? OdataCount { get; set; } + /// + /// The link to the next set of results. Not empty if value contains incomplete list of live outputs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next set of results. Not empty if value contains incomplete list of live outputs.", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// The result of the List LiveOutput operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The result of the List LiveOutput operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput[] Value { get; set; } + + } + /// The LiveOutput list result. + internal partial interface ILiveOutputListResultInternal + + { + /// The number of result. + int? OdataCount { get; set; } + /// + /// The link to the next set of results. Not empty if value contains incomplete list of live outputs. + /// + string OdataNextLink { get; set; } + /// The result of the List LiveOutput operation. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputListResult.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputListResult.json.cs new file mode 100644 index 000000000000..e1df0b5fc8bc --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputListResult.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The LiveOutput list result. + public partial class LiveOutputListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveOutputListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveOutputListResult(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutput) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.LiveOutput.FromJson(__u) )) ))() : null : Value;} + {_odataCount = If( json?.PropertyT("@odata.count"), out var __jsonOdataCount) ? (int?)__jsonOdataCount : OdataCount;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != this._odataCount ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._odataCount) : null, "@odata.count" ,container.Add ); + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputProperties.cs new file mode 100644 index 000000000000..d83647cf489e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputProperties.cs @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The JSON object that contains the properties required to create a live output. + public partial class LiveOutputProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal + { + + /// Backing field for property. + private global::System.TimeSpan _archiveWindowLength; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan ArchiveWindowLength { get => this._archiveWindowLength; set => this._archiveWindowLength = value; } + + /// Backing field for property. + private string _assetName; + + /// The asset that the live output will write to. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AssetName { get => this._assetName; set => this._assetName = value; } + + /// Backing field for property. + private global::System.DateTime? _created; + + /// The creation time the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private string _description; + + /// The description of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls _hl; + + /// HTTP Live Streaming (HLS) packing setting for the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls Hl { get => (this._hl = this._hl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.Hls()); set => this._hl = value; } + + /// + /// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not + /// affect the packing ratio for HLS CMAF output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? HlFragmentsPerTsSegment { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsInternal)Hl).FragmentsPerTsSegment; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsInternal)Hl).FragmentsPerTsSegment = value ?? default(int); } + + /// Backing field for property. + private global::System.DateTime? _lastModified; + + /// The time the live output was last modified. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? LastModified { get => this._lastModified; } + + /// Backing field for property. + private string _manifestName; + + /// + /// The manifest file name. If not provided, the service will generate one automatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ManifestName { get => this._manifestName; set => this._manifestName = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal.Created { get => this._created; set { {_created = value;} } } + + /// Internal Acessors for Hl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal.Hl { get => (this._hl = this._hl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.Hls()); set { {_hl = value;} } } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal.LastModified { get => this._lastModified; set { {_lastModified = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputPropertiesInternal.ResourceState { get => this._resourceState; set { {_resourceState = value;} } } + + /// Backing field for property. + private long? _outputSnapTime; + + /// + /// The initial timestamp that the live output will start at, any content before this value will not be archived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long? OutputSnapTime { get => this._outputSnapTime; set => this._outputSnapTime = value; } + + /// Backing field for property. + private string _provisioningState; + + /// The provisioning state of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState? _resourceState; + + /// The resource state of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState? ResourceState { get => this._resourceState; } + + /// Backing field for property. + private global::System.TimeSpan? _rewindWindowLength; + + /// + /// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. + /// The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. + /// For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default + /// value 30m only if Live Event enables LL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.TimeSpan? RewindWindowLength { get => this._rewindWindowLength; set => this._rewindWindowLength = value; } + + /// Creates an new instance. + public LiveOutputProperties() + { + + } + } + /// The JSON object that contains the properties required to create a live output. + public partial interface ILiveOutputProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"archiveWindowLength", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan ArchiveWindowLength { get; set; } + /// The asset that the live output will write to. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The asset that the live output will write to.", + SerializedName = @"assetName", + PossibleTypes = new [] { typeof(string) })] + string AssetName { get; set; } + /// The creation time the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation time the live output.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// The description of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The description of the live output.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not + /// affect the packing ratio for HLS CMAF output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not affect the packing ratio for HLS CMAF output.", + SerializedName = @"fragmentsPerTsSegment", + PossibleTypes = new [] { typeof(int) })] + int? HlFragmentsPerTsSegment { get; set; } + /// The time the live output was last modified. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The time the live output was last modified.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// + /// The manifest file name. If not provided, the service will generate one automatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The manifest file name. If not provided, the service will generate one automatically.", + SerializedName = @"manifestName", + PossibleTypes = new [] { typeof(string) })] + string ManifestName { get; set; } + /// + /// The initial timestamp that the live output will start at, any content before this value will not be archived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The initial timestamp that the live output will start at, any content before this value will not be archived.", + SerializedName = @"outputSnapTime", + PossibleTypes = new [] { typeof(long) })] + long? OutputSnapTime { get; set; } + /// The provisioning state of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the live output.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// The resource state of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The resource state of the live output.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState? ResourceState { get; } + /// + /// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. + /// The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. + /// For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default + /// value 30m only if Live Event enables LL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event enables LL.", + SerializedName = @"rewindWindowLength", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? RewindWindowLength { get; set; } + + } + /// The JSON object that contains the properties required to create a live output. + internal partial interface ILiveOutputPropertiesInternal + + { + /// + /// 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. + /// + global::System.TimeSpan ArchiveWindowLength { get; set; } + /// The asset that the live output will write to. + string AssetName { get; set; } + /// The creation time the live output. + global::System.DateTime? Created { get; set; } + /// The description of the live output. + string Description { get; set; } + /// HTTP Live Streaming (HLS) packing setting for the live output. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHls Hl { get; set; } + /// + /// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not + /// affect the packing ratio for HLS CMAF output. + /// + int? HlFragmentsPerTsSegment { get; set; } + /// The time the live output was last modified. + global::System.DateTime? LastModified { get; set; } + /// + /// The manifest file name. If not provided, the service will generate one automatically. + /// + string ManifestName { get; set; } + /// + /// The initial timestamp that the live output will start at, any content before this value will not be archived. + /// + long? OutputSnapTime { get; set; } + /// The provisioning state of the live output. + string ProvisioningState { get; set; } + /// The resource state of the live output. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState? ResourceState { get; set; } + /// + /// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. + /// The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. + /// For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default + /// value 30m only if Live Event enables LL. + /// + global::System.TimeSpan? RewindWindowLength { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputProperties.json.cs new file mode 100644 index 000000000000..38b0215edf8a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/LiveOutputProperties.json.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The JSON object that contains the properties required to create a live output. + public partial class LiveOutputProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ILiveOutputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new LiveOutputProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal LiveOutputProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_hl = If( json?.PropertyT("hls"), out var __jsonHls) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.Hls.FromJson(__jsonHls) : Hl;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_assetName = If( json?.PropertyT("assetName"), out var __jsonAssetName) ? (string)__jsonAssetName : (string)AssetName;} + {_archiveWindowLength = If( json?.PropertyT("archiveWindowLength"), out var __jsonArchiveWindowLength) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonArchiveWindowLength ) : ArchiveWindowLength;} + {_rewindWindowLength = If( json?.PropertyT("rewindWindowLength"), out var __jsonRewindWindowLength) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonRewindWindowLength ) : RewindWindowLength;} + {_manifestName = If( json?.PropertyT("manifestName"), out var __jsonManifestName) ? (string)__jsonManifestName : (string)ManifestName;} + {_outputSnapTime = If( json?.PropertyT("outputSnapTime"), out var __jsonOutputSnapTime) ? (long?)__jsonOutputSnapTime : OutputSnapTime;} + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_lastModified = If( json?.PropertyT("lastModified"), out var __jsonLastModified) ? global::System.DateTime.TryParse((string)__jsonLastModified, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedValue) ? __jsonLastModifiedValue : LastModified : LastModified;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_resourceState = If( json?.PropertyT("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._hl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._hl.ToJson(null,serializationMode) : null, "hls" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != (((object)this._assetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._assetName.ToString()) : null, "assetName" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._archiveWindowLength)), "archiveWindowLength" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)(null != this._rewindWindowLength ? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._rewindWindowLength)): null), "rewindWindowLength" ,container.Add ); + AddIf( null != (((object)this._manifestName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._manifestName.ToString()) : null, "manifestName" ,container.Add ); + AddIf( null != this._outputSnapTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((long)this._outputSnapTime) : null, "outputSnapTime" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._lastModified ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModified?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModified" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._resourceState.ToString()) : null, "resourceState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/MediaFilterProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/MediaFilterProperties.cs new file mode 100644 index 000000000000..ce3273fbb130 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/MediaFilterProperties.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Media Filter properties. + public partial class MediaFilterProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality _firstQuality; + + /// The first quality. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality FirstQuality { get => (this._firstQuality = this._firstQuality ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.FirstQuality()); set => this._firstQuality = value; } + + /// The first quality bitrate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? FirstQualityBitrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQualityInternal)FirstQuality).Bitrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQualityInternal)FirstQuality).Bitrate = value ?? default(int); } + + /// Internal Acessors for FirstQuality + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal.FirstQuality { get => (this._firstQuality = this._firstQuality ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.FirstQuality()); set { {_firstQuality = value;} } } + + /// Internal Acessors for PresentationTimeRange + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterPropertiesInternal.PresentationTimeRange { get => (this._presentationTimeRange = this._presentationTimeRange ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.PresentationTimeRange()); set { {_presentationTimeRange = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange _presentationTimeRange; + + /// The presentation time range. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange PresentationTimeRange { get => (this._presentationTimeRange = this._presentationTimeRange ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.PresentationTimeRange()); set => this._presentationTimeRange = value; } + + /// The absolute end time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeEndTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).EndTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).EndTimestamp = value ?? default(long); } + + /// The indicator of forcing existing of end time stamp. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? PresentationTimeRangeForceEndTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).ForceEndTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).ForceEndTimestamp = value ?? default(bool); } + + /// The relative to end right edge. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeLiveBackoffDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).LiveBackoffDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).LiveBackoffDuration = value ?? default(long); } + + /// The relative to end sliding window. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangePresentationWindowDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).PresentationWindowDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).PresentationWindowDuration = value ?? default(long); } + + /// The absolute start time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeStartTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).StartTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).StartTimestamp = value ?? default(long); } + + /// The time scale of time stamps. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? PresentationTimeRangeTimescale { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).Timescale; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal)PresentationTimeRange).Timescale = value ?? default(long); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] _track; + + /// The tracks selection conditions. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] Track { get => this._track; set => this._track = value; } + + /// Creates an new instance. + public MediaFilterProperties() + { + + } + } + /// The Media Filter properties. + public partial interface IMediaFilterProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The first quality bitrate. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The first quality bitrate.", + SerializedName = @"bitrate", + PossibleTypes = new [] { typeof(int) })] + int? FirstQualityBitrate { get; set; } + /// The absolute end time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The absolute end time boundary.", + SerializedName = @"endTimestamp", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeEndTimestamp { get; set; } + /// The indicator of forcing existing of end time stamp. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The indicator of forcing existing of end time stamp.", + SerializedName = @"forceEndTimestamp", + PossibleTypes = new [] { typeof(bool) })] + bool? PresentationTimeRangeForceEndTimestamp { get; set; } + /// The relative to end right edge. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative to end right edge.", + SerializedName = @"liveBackoffDuration", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeLiveBackoffDuration { get; set; } + /// The relative to end sliding window. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative to end sliding window.", + SerializedName = @"presentationWindowDuration", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangePresentationWindowDuration { get; set; } + /// The absolute start time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The absolute start time boundary.", + SerializedName = @"startTimestamp", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeStartTimestamp { get; set; } + /// The time scale of time stamps. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time scale of time stamps.", + SerializedName = @"timescale", + PossibleTypes = new [] { typeof(long) })] + long? PresentationTimeRangeTimescale { get; set; } + /// The tracks selection conditions. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The tracks selection conditions.", + SerializedName = @"tracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] Track { get; set; } + + } + /// The Media Filter properties. + internal partial interface IMediaFilterPropertiesInternal + + { + /// The first quality. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFirstQuality FirstQuality { get; set; } + /// The first quality bitrate. + int? FirstQualityBitrate { get; set; } + /// The presentation time range. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange PresentationTimeRange { get; set; } + /// The absolute end time boundary. + long? PresentationTimeRangeEndTimestamp { get; set; } + /// The indicator of forcing existing of end time stamp. + bool? PresentationTimeRangeForceEndTimestamp { get; set; } + /// The relative to end right edge. + long? PresentationTimeRangeLiveBackoffDuration { get; set; } + /// The relative to end sliding window. + long? PresentationTimeRangePresentationWindowDuration { get; set; } + /// The absolute start time boundary. + long? PresentationTimeRangeStartTimestamp { get; set; } + /// The time scale of time stamps. + long? PresentationTimeRangeTimescale { get; set; } + /// The tracks selection conditions. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection[] Track { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/MediaFilterProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/MediaFilterProperties.json.cs new file mode 100644 index 000000000000..d72d28d37472 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/MediaFilterProperties.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The Media Filter properties. + public partial class MediaFilterProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IMediaFilterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaFilterProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MediaFilterProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_presentationTimeRange = If( json?.PropertyT("presentationTimeRange"), out var __jsonPresentationTimeRange) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.PresentationTimeRange.FromJson(__jsonPresentationTimeRange) : PresentationTimeRange;} + {_firstQuality = If( json?.PropertyT("firstQuality"), out var __jsonFirstQuality) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.FirstQuality.FromJson(__jsonFirstQuality) : FirstQuality;} + {_track = If( json?.PropertyT("tracks"), out var __jsonTracks) ? If( __jsonTracks as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IFilterTrackSelection) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.FilterTrackSelection.FromJson(__u) )) ))() : null : Track;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._presentationTimeRange ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._presentationTimeRange.ToJson(null,serializationMode) : null, "presentationTimeRange" ,container.Add ); + AddIf( null != this._firstQuality ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._firstQuality.ToJson(null,serializationMode) : null, "firstQuality" ,container.Add ); + if (null != this._track) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._track ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tracks",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/NoEncryption.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/NoEncryption.cs new file mode 100644 index 000000000000..439636eba78f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/NoEncryption.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for NoEncryption scheme + public partial class NoEncryption : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols _enabledProtocol; + + /// Representing supported protocols + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnabledProtocol { get => (this._enabledProtocol = this._enabledProtocol ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols()); set => this._enabledProtocol = value; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Dash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Dash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Download; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Download = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Hl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).Hl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnabledProtocolSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).SmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocolsInternal)EnabledProtocol).SmoothStreaming = value ?? default(bool); } + + /// Internal Acessors for EnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal.EnabledProtocol { get => (this._enabledProtocol = this._enabledProtocol ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols()); set { {_enabledProtocol = value;} } } + + /// Creates an new instance. + public NoEncryption() + { + + } + } + /// Class for NoEncryption scheme + public partial interface INoEncryption : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? EnabledProtocolSmoothStreaming { get; set; } + + } + /// Class for NoEncryption scheme + internal partial interface INoEncryptionInternal + + { + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? EnabledProtocolDash { get; set; } + /// Enable Download protocol or not + bool? EnabledProtocolDownload { get; set; } + /// Enable HLS protocol or not + bool? EnabledProtocolHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? EnabledProtocolSmoothStreaming { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/NoEncryption.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/NoEncryption.json.cs new file mode 100644 index 000000000000..f6b386ebdc1f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/NoEncryption.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for NoEncryption scheme + public partial class NoEncryption + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new NoEncryption(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal NoEncryption(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_enabledProtocol = If( json?.PropertyT("enabledProtocols"), out var __jsonEnabledProtocols) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnabledProtocols.FromJson(__jsonEnabledProtocols) : EnabledProtocol;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._enabledProtocol ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._enabledProtocol.ToJson(null,serializationMode) : null, "enabledProtocols" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/PresentationTimeRange.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/PresentationTimeRange.cs new file mode 100644 index 000000000000..c7b3796c4afa --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/PresentationTimeRange.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// The presentation time range, this is asset related and not recommended for Account Filter. + /// + public partial class PresentationTimeRange : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRangeInternal + { + + /// Backing field for property. + private long? _endTimestamp; + + /// The absolute end time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long? EndTimestamp { get => this._endTimestamp; set => this._endTimestamp = value; } + + /// Backing field for property. + private bool? _forceEndTimestamp; + + /// The indicator of forcing existing of end time stamp. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? ForceEndTimestamp { get => this._forceEndTimestamp; set => this._forceEndTimestamp = value; } + + /// Backing field for property. + private long? _liveBackoffDuration; + + /// The relative to end right edge. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long? LiveBackoffDuration { get => this._liveBackoffDuration; set => this._liveBackoffDuration = value; } + + /// Backing field for property. + private long? _presentationWindowDuration; + + /// The relative to end sliding window. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long? PresentationWindowDuration { get => this._presentationWindowDuration; set => this._presentationWindowDuration = value; } + + /// Backing field for property. + private long? _startTimestamp; + + /// The absolute start time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long? StartTimestamp { get => this._startTimestamp; set => this._startTimestamp = value; } + + /// Backing field for property. + private long? _timescale; + + /// The time scale of time stamps. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long? Timescale { get => this._timescale; set => this._timescale = value; } + + /// Creates an new instance. + public PresentationTimeRange() + { + + } + } + /// The presentation time range, this is asset related and not recommended for Account Filter. + public partial interface IPresentationTimeRange : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The absolute end time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The absolute end time boundary.", + SerializedName = @"endTimestamp", + PossibleTypes = new [] { typeof(long) })] + long? EndTimestamp { get; set; } + /// The indicator of forcing existing of end time stamp. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The indicator of forcing existing of end time stamp.", + SerializedName = @"forceEndTimestamp", + PossibleTypes = new [] { typeof(bool) })] + bool? ForceEndTimestamp { get; set; } + /// The relative to end right edge. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative to end right edge.", + SerializedName = @"liveBackoffDuration", + PossibleTypes = new [] { typeof(long) })] + long? LiveBackoffDuration { get; set; } + /// The relative to end sliding window. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative to end sliding window.", + SerializedName = @"presentationWindowDuration", + PossibleTypes = new [] { typeof(long) })] + long? PresentationWindowDuration { get; set; } + /// The absolute start time boundary. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The absolute start time boundary.", + SerializedName = @"startTimestamp", + PossibleTypes = new [] { typeof(long) })] + long? StartTimestamp { get; set; } + /// The time scale of time stamps. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time scale of time stamps.", + SerializedName = @"timescale", + PossibleTypes = new [] { typeof(long) })] + long? Timescale { get; set; } + + } + /// The presentation time range, this is asset related and not recommended for Account Filter. + internal partial interface IPresentationTimeRangeInternal + + { + /// The absolute end time boundary. + long? EndTimestamp { get; set; } + /// The indicator of forcing existing of end time stamp. + bool? ForceEndTimestamp { get; set; } + /// The relative to end right edge. + long? LiveBackoffDuration { get; set; } + /// The relative to end sliding window. + long? PresentationWindowDuration { get; set; } + /// The absolute start time boundary. + long? StartTimestamp { get; set; } + /// The time scale of time stamps. + long? Timescale { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/PresentationTimeRange.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/PresentationTimeRange.json.cs new file mode 100644 index 000000000000..56909fa20376 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/PresentationTimeRange.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// The presentation time range, this is asset related and not recommended for Account Filter. + /// + public partial class PresentationTimeRange + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPresentationTimeRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new PresentationTimeRange(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal PresentationTimeRange(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_startTimestamp = If( json?.PropertyT("startTimestamp"), out var __jsonStartTimestamp) ? (long?)__jsonStartTimestamp : StartTimestamp;} + {_endTimestamp = If( json?.PropertyT("endTimestamp"), out var __jsonEndTimestamp) ? (long?)__jsonEndTimestamp : EndTimestamp;} + {_presentationWindowDuration = If( json?.PropertyT("presentationWindowDuration"), out var __jsonPresentationWindowDuration) ? (long?)__jsonPresentationWindowDuration : PresentationWindowDuration;} + {_liveBackoffDuration = If( json?.PropertyT("liveBackoffDuration"), out var __jsonLiveBackoffDuration) ? (long?)__jsonLiveBackoffDuration : LiveBackoffDuration;} + {_timescale = If( json?.PropertyT("timescale"), out var __jsonTimescale) ? (long?)__jsonTimescale : Timescale;} + {_forceEndTimestamp = If( json?.PropertyT("forceEndTimestamp"), out var __jsonForceEndTimestamp) ? (bool?)__jsonForceEndTimestamp : ForceEndTimestamp;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._startTimestamp ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((long)this._startTimestamp) : null, "startTimestamp" ,container.Add ); + AddIf( null != this._endTimestamp ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((long)this._endTimestamp) : null, "endTimestamp" ,container.Add ); + AddIf( null != this._presentationWindowDuration ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((long)this._presentationWindowDuration) : null, "presentationWindowDuration" ,container.Add ); + AddIf( null != this._liveBackoffDuration ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((long)this._liveBackoffDuration) : null, "liveBackoffDuration" ,container.Add ); + AddIf( null != this._timescale ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((long)this._timescale) : null, "timescale" ,container.Add ); + AddIf( null != this._forceEndTimestamp ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._forceEndTimestamp) : null, "forceEndTimestamp" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StorageEncryptedAssetDecryptionData.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StorageEncryptedAssetDecryptionData.cs new file mode 100644 index 000000000000..533c34fed9b7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StorageEncryptedAssetDecryptionData.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Data needed to decrypt asset files encrypted with legacy storage encryption. + public partial class StorageEncryptedAssetDecryptionData : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStorageEncryptedAssetDecryptionData, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStorageEncryptedAssetDecryptionDataInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata[] _assetFileEncryptionMetadata; + + /// Asset File encryption metadata. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata[] AssetFileEncryptionMetadata { get => this._assetFileEncryptionMetadata; set => this._assetFileEncryptionMetadata = value; } + + /// Backing field for property. + private byte[] _key; + + /// The Asset File storage encryption key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public byte[] Key { get => this._key; set => this._key = value; } + + /// Creates an new instance. + public StorageEncryptedAssetDecryptionData() + { + + } + } + /// Data needed to decrypt asset files encrypted with legacy storage encryption. + public partial interface IStorageEncryptedAssetDecryptionData : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Asset File encryption metadata. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Asset File encryption metadata.", + SerializedName = @"assetFileEncryptionMetadata", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata[] AssetFileEncryptionMetadata { get; set; } + /// The Asset File storage encryption key. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Asset File storage encryption key.", + SerializedName = @"key", + PossibleTypes = new [] { typeof(byte[]) })] + byte[] Key { get; set; } + + } + /// Data needed to decrypt asset files encrypted with legacy storage encryption. + internal partial interface IStorageEncryptedAssetDecryptionDataInternal + + { + /// Asset File encryption metadata. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata[] AssetFileEncryptionMetadata { get; set; } + /// The Asset File storage encryption key. + byte[] Key { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StorageEncryptedAssetDecryptionData.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StorageEncryptedAssetDecryptionData.json.cs new file mode 100644 index 000000000000..142e20a18d8e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StorageEncryptedAssetDecryptionData.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Data needed to decrypt asset files encrypted with legacy storage encryption. + public partial class StorageEncryptedAssetDecryptionData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStorageEncryptedAssetDecryptionData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStorageEncryptedAssetDecryptionData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStorageEncryptedAssetDecryptionData FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StorageEncryptedAssetDecryptionData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StorageEncryptedAssetDecryptionData(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_key = If( json?.PropertyT("key"), out var __w) ? System.Convert.FromBase64String( ((string)__w).Replace("_","/").Replace("-","+").PadRight( ((string)__w).Length + ((string)__w).Length * 3 % 4, '=') ) : null;} + {_assetFileEncryptionMetadata = If( json?.PropertyT("assetFileEncryptionMetadata"), out var __jsonAssetFileEncryptionMetadata) ? If( __jsonAssetFileEncryptionMetadata as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __t) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__t, (__s)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAssetFileEncryptionMetadata) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AssetFileEncryptionMetadata.FromJson(__s) )) ))() : null : AssetFileEncryptionMetadata;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._key ? global::System.Convert.ToBase64String( this._key) : null ,(v)=> container.Add( "key",v) ); + if (null != this._assetFileEncryptionMetadata) + { + var __u = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __v in this._assetFileEncryptionMetadata ) + { + AddIf(__v?.ToJson(null, serializationMode) ,__u.Add); + } + container.Add("assetFileEncryptionMetadata",__u); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpoint.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpoint.cs new file mode 100644 index 000000000000..5f2556849465 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpoint.cs @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint. + public partial class StreamingEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.TrackedResource(); + + /// authentication key list + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AkamaiSignatureHeaderAuthenticationKeyList; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AkamaiSignatureHeaderAuthenticationKeyList = value ?? null /* arrayOf */; } + + /// This feature is deprecated, do not set a value for this property. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string AvailabilitySetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AvailabilitySetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AvailabilitySetName = value ?? null; } + + /// The CDN enabled flag. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CdnEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CdnEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CdnEnabled = value ?? default(bool); } + + /// The CDN profile name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CdnProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CdnProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CdnProfile = value ?? null; } + + /// The CDN provider name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CdnProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CdnProvider; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CdnProvider = value ?? null; } + + /// The exact time the streaming endpoint was created. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).Created; } + + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CrossSiteAccessPolicyClientAccessPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CrossSiteAccessPolicyClientAccessPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CrossSiteAccessPolicyClientAccessPolicy = value ?? null; } + + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CrossSiteAccessPolicyCrossDomainPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CrossSiteAccessPolicyCrossDomainPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CrossSiteAccessPolicyCrossDomainPolicy = value ?? null; } + + /// The custom host names of the streaming endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string[] CustomHostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CustomHostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CustomHostName = value ?? null /* arrayOf */; } + + /// The streaming endpoint description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).Description = value ?? null; } + + /// The free trial expiration time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? FreeTrialEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).FreeTrialEndTime; } + + /// The streaming endpoint host name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).HostName; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).IPAllow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).IPAllow = value ?? null /* arrayOf */; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Id; } + + /// The exact time the streaming endpoint was last modified. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).LastModified; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Max cache age + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public long? MaxCacheAge { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).MaxCacheAge; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).MaxCacheAge = value ?? default(long); } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Type = value; } + + /// Internal Acessors for AccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.AccessControl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AccessControl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AccessControl = value; } + + /// Internal Acessors for AccessControlAkamai + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.AccessControlAkamai { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AccessControlAkamai; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AccessControlAkamai = value; } + + /// Internal Acessors for AccessControlIP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.AccessControlIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AccessControlIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).AccessControlIP = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).Created; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).Created = value; } + + /// Internal Acessors for CrossSiteAccessPolicy + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.CrossSiteAccessPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CrossSiteAccessPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).CrossSiteAccessPolicy = value; } + + /// Internal Acessors for FreeTrialEndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.FreeTrialEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).FreeTrialEndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).FreeTrialEndTime = value; } + + /// Internal Acessors for HostName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).HostName = value; } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.LastModified { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).LastModified; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).LastModified = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpointProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).ResourceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).ResourceState = value; } + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSku Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointCurrentSku()); set { {_sku = value;} } } + + /// Internal Acessors for SkuName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSkuInternal)Sku).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointProperties _property; + + /// The streaming endpoint properties. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpointProperties()); set => this._property = value; } + + /// The provisioning state of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).ProvisioningState; } + + /// The resource state of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState? ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).ResourceState; } + + /// The number of scale units. Use the Scale operation to adjust this value. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? ScaleUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).ScaleUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal)Property).ScaleUnit = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSku _sku; + + /// The streaming endpoint sku. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointCurrentSku()); set => this._sku = value; } + + /// The streaming endpoint sku capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSkuInternal)Sku).Capacity = value ?? default(int); } + + /// The streaming endpoint sku name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSkuInternal)Sku).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__trackedResource).Type; } + + /// Creates an new instance. + public StreamingEndpoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// The streaming endpoint. + public partial interface IStreamingEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResource + { + /// authentication key list + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"authentication key list", + SerializedName = @"akamaiSignatureHeaderAuthenticationKeyList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get; set; } + /// This feature is deprecated, do not set a value for this property. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This feature is deprecated, do not set a value for this property.", + SerializedName = @"availabilitySetName", + PossibleTypes = new [] { typeof(string) })] + string AvailabilitySetName { get; set; } + /// The CDN enabled flag. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The CDN enabled flag.", + SerializedName = @"cdnEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CdnEnabled { get; set; } + /// The CDN profile name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The CDN profile name.", + SerializedName = @"cdnProfile", + PossibleTypes = new [] { typeof(string) })] + string CdnProfile { get; set; } + /// The CDN provider name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The CDN provider name.", + SerializedName = @"cdnProvider", + PossibleTypes = new [] { typeof(string) })] + string CdnProvider { get; set; } + /// The exact time the streaming endpoint was created. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The exact time the streaming endpoint was created.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of clientaccesspolicy.xml used by Silverlight.", + SerializedName = @"clientAccessPolicy", + PossibleTypes = new [] { typeof(string) })] + string CrossSiteAccessPolicyClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of crossdomain.xml used by Silverlight.", + SerializedName = @"crossDomainPolicy", + PossibleTypes = new [] { typeof(string) })] + string CrossSiteAccessPolicyCrossDomainPolicy { get; set; } + /// The custom host names of the streaming endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The custom host names of the streaming endpoint", + SerializedName = @"customHostNames", + PossibleTypes = new [] { typeof(string) })] + string[] CustomHostName { get; set; } + /// The streaming endpoint description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The free trial expiration time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The free trial expiration time.", + SerializedName = @"freeTrialEndTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? FreeTrialEndTime { get; } + /// The streaming endpoint host name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The streaming endpoint host name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; } + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + /// The exact time the streaming endpoint was last modified. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The exact time the streaming endpoint was last modified.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// Max cache age + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Max cache age", + SerializedName = @"maxCacheAge", + PossibleTypes = new [] { typeof(long) })] + long? MaxCacheAge { get; set; } + /// The provisioning state of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the streaming endpoint.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// The resource state of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The resource state of the streaming endpoint.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState? ResourceState { get; } + /// The number of scale units. Use the Scale operation to adjust this value. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of scale units. Use the Scale operation to adjust this value.", + SerializedName = @"scaleUnits", + PossibleTypes = new [] { typeof(int) })] + int? ScaleUnit { get; set; } + /// The streaming endpoint sku capacity. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint sku capacity.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? SkuCapacity { get; set; } + /// The streaming endpoint sku name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The streaming endpoint sku name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string SkuName { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// The streaming endpoint. + internal partial interface IStreamingEndpointInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ITrackedResourceInternal + { + /// The access control definition of the streaming endpoint. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl AccessControl { get; set; } + /// The access control of Akamai + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl AccessControlAkamai { get; set; } + /// The IP access control of the streaming endpoint. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl AccessControlIP { get; set; } + /// authentication key list + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get; set; } + /// This feature is deprecated, do not set a value for this property. + string AvailabilitySetName { get; set; } + /// The CDN enabled flag. + bool? CdnEnabled { get; set; } + /// The CDN profile name. + string CdnProfile { get; set; } + /// The CDN provider name. + string CdnProvider { get; set; } + /// The exact time the streaming endpoint was created. + global::System.DateTime? Created { get; set; } + /// The streaming endpoint access policies. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies CrossSiteAccessPolicy { get; set; } + /// The content of clientaccesspolicy.xml used by Silverlight. + string CrossSiteAccessPolicyClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + string CrossSiteAccessPolicyCrossDomainPolicy { get; set; } + /// The custom host names of the streaming endpoint + string[] CustomHostName { get; set; } + /// The streaming endpoint description. + string Description { get; set; } + /// The free trial expiration time. + global::System.DateTime? FreeTrialEndTime { get; set; } + /// The streaming endpoint host name. + string HostName { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + /// The exact time the streaming endpoint was last modified. + global::System.DateTime? LastModified { get; set; } + /// Max cache age + long? MaxCacheAge { get; set; } + /// The streaming endpoint properties. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointProperties Property { get; set; } + /// The provisioning state of the streaming endpoint. + string ProvisioningState { get; set; } + /// The resource state of the streaming endpoint. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState? ResourceState { get; set; } + /// The number of scale units. Use the Scale operation to adjust this value. + int? ScaleUnit { get; set; } + /// The streaming endpoint sku. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointCurrentSku Sku { get; set; } + /// The streaming endpoint sku capacity. + int? SkuCapacity { get; set; } + /// The streaming endpoint sku name. + string SkuName { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpoint.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpoint.json.cs new file mode 100644 index 000000000000..f5227c0be88d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpoint.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint. + public partial class StreamingEndpoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingEndpoint(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingEndpoint(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpointProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointCurrentSku.FromJson(__jsonSku) : Sku;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointAccessControl.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointAccessControl.cs new file mode 100644 index 000000000000..16ca16b029bd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointAccessControl.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Streaming endpoint access control definition. + public partial class StreamingEndpointAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl _akamai; + + /// The access control of Akamai + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl Akamai { get => (this._akamai = this._akamai ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AkamaiAccessControl()); set => this._akamai = value; } + + /// authentication key list + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControlInternal)Akamai).AkamaiSignatureHeaderAuthenticationKeyList; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControlInternal)Akamai).AkamaiSignatureHeaderAuthenticationKeyList = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl _iP; + + /// The IP access control of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl IP { get => (this._iP = this._iP ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPAccessControl()); set => this._iP = value; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControlInternal)IP).Allow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControlInternal)IP).Allow = value ?? null /* arrayOf */; } + + /// Internal Acessors for Akamai + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal.Akamai { get => (this._akamai = this._akamai ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AkamaiAccessControl()); set { {_akamai = value;} } } + + /// Internal Acessors for IP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal.IP { get => (this._iP = this._iP ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPAccessControl()); set { {_iP = value;} } } + + /// Creates an new instance. + public StreamingEndpointAccessControl() + { + + } + } + /// Streaming endpoint access control definition. + public partial interface IStreamingEndpointAccessControl : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// authentication key list + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"authentication key list", + SerializedName = @"akamaiSignatureHeaderAuthenticationKeyList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get; set; } + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + + } + /// Streaming endpoint access control definition. + internal partial interface IStreamingEndpointAccessControlInternal + + { + /// The access control of Akamai + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl Akamai { get; set; } + /// authentication key list + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get; set; } + /// The IP access control of the streaming endpoint. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl IP { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointAccessControl.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointAccessControl.json.cs new file mode 100644 index 000000000000..9b2af8e68847 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointAccessControl.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Streaming endpoint access control definition. + public partial class StreamingEndpointAccessControl + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingEndpointAccessControl(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingEndpointAccessControl(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_akamai = If( json?.PropertyT("akamai"), out var __jsonAkamai) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.AkamaiAccessControl.FromJson(__jsonAkamai) : Akamai;} + {_iP = If( json?.PropertyT("ip"), out var __jsonIP) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IPAccessControl.FromJson(__jsonIP) : IP;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._akamai ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._akamai.ToJson(null,serializationMode) : null, "akamai" ,container.Add ); + AddIf( null != this._iP ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._iP.ToJson(null,serializationMode) : null, "ip" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointListResult.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointListResult.cs new file mode 100644 index 000000000000..73d3a1f1c879 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointListResult.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint list result. + public partial class StreamingEndpointListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointListResult, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointListResultInternal + { + + /// Backing field for property. + private int? _odataCount; + + /// The number of result. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? OdataCount { get => this._odataCount; set => this._odataCount = value; } + + /// Backing field for property. + private string _odataNextLink; + + /// + /// The link to the next set of results. Not empty if value contains incomplete list of streaming endpoints. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint[] _value; + + /// The result of the List StreamingEndpoint operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public StreamingEndpointListResult() + { + + } + } + /// The streaming endpoint list result. + public partial interface IStreamingEndpointListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The number of result. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result.", + SerializedName = @"@odata.count", + PossibleTypes = new [] { typeof(int) })] + int? OdataCount { get; set; } + /// + /// The link to the next set of results. Not empty if value contains incomplete list of streaming endpoints. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next set of results. Not empty if value contains incomplete list of streaming endpoints.", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// The result of the List StreamingEndpoint operation. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The result of the List StreamingEndpoint operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint[] Value { get; set; } + + } + /// The streaming endpoint list result. + internal partial interface IStreamingEndpointListResultInternal + + { + /// The number of result. + int? OdataCount { get; set; } + /// + /// The link to the next set of results. Not empty if value contains incomplete list of streaming endpoints. + /// + string OdataNextLink { get; set; } + /// The result of the List StreamingEndpoint operation. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointListResult.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointListResult.json.cs new file mode 100644 index 000000000000..a75c50aaa79e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointListResult.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint list result. + public partial class StreamingEndpointListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingEndpointListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingEndpointListResult(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpoint.FromJson(__u) )) ))() : null : Value;} + {_odataCount = If( json?.PropertyT("@odata.count"), out var __jsonOdataCount) ? (int?)__jsonOdataCount : OdataCount;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != this._odataCount ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._odataCount) : null, "@odata.count" ,container.Add ); + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointProperties.cs new file mode 100644 index 000000000000..7a3de354384c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointProperties.cs @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint properties. + public partial class StreamingEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl _accessControl; + + /// The access control definition of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl AccessControl { get => (this._accessControl = this._accessControl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpointAccessControl()); set => this._accessControl = value; } + + /// authentication key list + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal)AccessControl).AkamaiSignatureHeaderAuthenticationKeyList; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal)AccessControl).AkamaiSignatureHeaderAuthenticationKeyList = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _availabilitySetName; + + /// This feature is deprecated, do not set a value for this property. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AvailabilitySetName { get => this._availabilitySetName; set => this._availabilitySetName = value; } + + /// Backing field for property. + private bool? _cdnEnabled; + + /// The CDN enabled flag. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool? CdnEnabled { get => this._cdnEnabled; set => this._cdnEnabled = value; } + + /// Backing field for property. + private string _cdnProfile; + + /// The CDN profile name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CdnProfile { get => this._cdnProfile; set => this._cdnProfile = value; } + + /// Backing field for property. + private string _cdnProvider; + + /// The CDN provider name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CdnProvider { get => this._cdnProvider; set => this._cdnProvider = value; } + + /// Backing field for property. + private global::System.DateTime? _created; + + /// The exact time the streaming endpoint was created. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies _crossSiteAccessPolicy; + + /// The streaming endpoint access policies. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies CrossSiteAccessPolicy { get => (this._crossSiteAccessPolicy = this._crossSiteAccessPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CrossSiteAccessPolicies()); set => this._crossSiteAccessPolicy = value; } + + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CrossSiteAccessPolicyClientAccessPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPoliciesInternal)CrossSiteAccessPolicy).ClientAccessPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPoliciesInternal)CrossSiteAccessPolicy).ClientAccessPolicy = value ?? null; } + + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CrossSiteAccessPolicyCrossDomainPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPoliciesInternal)CrossSiteAccessPolicy).CrossDomainPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPoliciesInternal)CrossSiteAccessPolicy).CrossDomainPolicy = value ?? null; } + + /// Backing field for property. + private string[] _customHostName; + + /// The custom host names of the streaming endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] CustomHostName { get => this._customHostName; set => this._customHostName = value; } + + /// Backing field for property. + private string _description; + + /// The streaming endpoint description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private global::System.DateTime? _freeTrialEndTime; + + /// The free trial expiration time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? FreeTrialEndTime { get => this._freeTrialEndTime; } + + /// Backing field for property. + private string _hostName; + + /// The streaming endpoint host name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; } + + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal)AccessControl).IPAllow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal)AccessControl).IPAllow = value ?? null /* arrayOf */; } + + /// Backing field for property. + private global::System.DateTime? _lastModified; + + /// The exact time the streaming endpoint was last modified. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? LastModified { get => this._lastModified; } + + /// Backing field for property. + private long? _maxCacheAge; + + /// Max cache age + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public long? MaxCacheAge { get => this._maxCacheAge; set => this._maxCacheAge = value; } + + /// Internal Acessors for AccessControl + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.AccessControl { get => (this._accessControl = this._accessControl ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpointAccessControl()); set { {_accessControl = value;} } } + + /// Internal Acessors for AccessControlAkamai + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.AccessControlAkamai { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal)AccessControl).Akamai; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal)AccessControl).Akamai = value; } + + /// Internal Acessors for AccessControlIP + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.AccessControlIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal)AccessControl).IP; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControlInternal)AccessControl).IP = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.Created { get => this._created; set { {_created = value;} } } + + /// Internal Acessors for CrossSiteAccessPolicy + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.CrossSiteAccessPolicy { get => (this._crossSiteAccessPolicy = this._crossSiteAccessPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CrossSiteAccessPolicies()); set { {_crossSiteAccessPolicy = value;} } } + + /// Internal Acessors for FreeTrialEndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.FreeTrialEndTime { get => this._freeTrialEndTime; set { {_freeTrialEndTime = value;} } } + + /// Internal Acessors for HostName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.HostName { get => this._hostName; set { {_hostName = value;} } } + + /// Internal Acessors for LastModified + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.LastModified { get => this._lastModified; set { {_lastModified = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointPropertiesInternal.ResourceState { get => this._resourceState; set { {_resourceState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The provisioning state of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState? _resourceState; + + /// The resource state of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState? ResourceState { get => this._resourceState; } + + /// Backing field for property. + private int _scaleUnit; + + /// The number of scale units. Use the Scale operation to adjust this value. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int ScaleUnit { get => this._scaleUnit; set => this._scaleUnit = value; } + + /// Creates an new instance. + public StreamingEndpointProperties() + { + + } + } + /// The streaming endpoint properties. + public partial interface IStreamingEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// authentication key list + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"authentication key list", + SerializedName = @"akamaiSignatureHeaderAuthenticationKeyList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get; set; } + /// This feature is deprecated, do not set a value for this property. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This feature is deprecated, do not set a value for this property.", + SerializedName = @"availabilitySetName", + PossibleTypes = new [] { typeof(string) })] + string AvailabilitySetName { get; set; } + /// The CDN enabled flag. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The CDN enabled flag.", + SerializedName = @"cdnEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CdnEnabled { get; set; } + /// The CDN profile name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The CDN profile name.", + SerializedName = @"cdnProfile", + PossibleTypes = new [] { typeof(string) })] + string CdnProfile { get; set; } + /// The CDN provider name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The CDN provider name.", + SerializedName = @"cdnProvider", + PossibleTypes = new [] { typeof(string) })] + string CdnProvider { get; set; } + /// The exact time the streaming endpoint was created. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The exact time the streaming endpoint was created.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// The content of clientaccesspolicy.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of clientaccesspolicy.xml used by Silverlight.", + SerializedName = @"clientAccessPolicy", + PossibleTypes = new [] { typeof(string) })] + string CrossSiteAccessPolicyClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The content of crossdomain.xml used by Silverlight.", + SerializedName = @"crossDomainPolicy", + PossibleTypes = new [] { typeof(string) })] + string CrossSiteAccessPolicyCrossDomainPolicy { get; set; } + /// The custom host names of the streaming endpoint + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The custom host names of the streaming endpoint", + SerializedName = @"customHostNames", + PossibleTypes = new [] { typeof(string) })] + string[] CustomHostName { get; set; } + /// The streaming endpoint description. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The streaming endpoint description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The free trial expiration time. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The free trial expiration time.", + SerializedName = @"freeTrialEndTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? FreeTrialEndTime { get; } + /// The streaming endpoint host name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The streaming endpoint host name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; } + /// The IP allow list. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IP allow list.", + SerializedName = @"allow", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + /// The exact time the streaming endpoint was last modified. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The exact time the streaming endpoint was last modified.", + SerializedName = @"lastModified", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModified { get; } + /// Max cache age + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Max cache age", + SerializedName = @"maxCacheAge", + PossibleTypes = new [] { typeof(long) })] + long? MaxCacheAge { get; set; } + /// The provisioning state of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the streaming endpoint.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// The resource state of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The resource state of the streaming endpoint.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState? ResourceState { get; } + /// The number of scale units. Use the Scale operation to adjust this value. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The number of scale units. Use the Scale operation to adjust this value.", + SerializedName = @"scaleUnits", + PossibleTypes = new [] { typeof(int) })] + int ScaleUnit { get; set; } + + } + /// The streaming endpoint properties. + internal partial interface IStreamingEndpointPropertiesInternal + + { + /// The access control definition of the streaming endpoint. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointAccessControl AccessControl { get; set; } + /// The access control of Akamai + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiAccessControl AccessControlAkamai { get; set; } + /// The IP access control of the streaming endpoint. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPAccessControl AccessControlIP { get; set; } + /// authentication key list + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IAkamaiSignatureHeaderAuthenticationKey[] AkamaiSignatureHeaderAuthenticationKeyList { get; set; } + /// This feature is deprecated, do not set a value for this property. + string AvailabilitySetName { get; set; } + /// The CDN enabled flag. + bool? CdnEnabled { get; set; } + /// The CDN profile name. + string CdnProfile { get; set; } + /// The CDN provider name. + string CdnProvider { get; set; } + /// The exact time the streaming endpoint was created. + global::System.DateTime? Created { get; set; } + /// The streaming endpoint access policies. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICrossSiteAccessPolicies CrossSiteAccessPolicy { get; set; } + /// The content of clientaccesspolicy.xml used by Silverlight. + string CrossSiteAccessPolicyClientAccessPolicy { get; set; } + /// The content of crossdomain.xml used by Silverlight. + string CrossSiteAccessPolicyCrossDomainPolicy { get; set; } + /// The custom host names of the streaming endpoint + string[] CustomHostName { get; set; } + /// The streaming endpoint description. + string Description { get; set; } + /// The free trial expiration time. + global::System.DateTime? FreeTrialEndTime { get; set; } + /// The streaming endpoint host name. + string HostName { get; set; } + /// The IP allow list. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IIPRange[] IPAllow { get; set; } + /// The exact time the streaming endpoint was last modified. + global::System.DateTime? LastModified { get; set; } + /// Max cache age + long? MaxCacheAge { get; set; } + /// The provisioning state of the streaming endpoint. + string ProvisioningState { get; set; } + /// The resource state of the streaming endpoint. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState? ResourceState { get; set; } + /// The number of scale units. Use the Scale operation to adjust this value. + int ScaleUnit { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointProperties.json.cs new file mode 100644 index 000000000000..7a7730a632fd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointProperties.json.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// The streaming endpoint properties. + public partial class StreamingEndpointProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingEndpointProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingEndpointProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_accessControl = If( json?.PropertyT("accessControl"), out var __jsonAccessControl) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingEndpointAccessControl.FromJson(__jsonAccessControl) : AccessControl;} + {_crossSiteAccessPolicy = If( json?.PropertyT("crossSiteAccessPolicies"), out var __jsonCrossSiteAccessPolicies) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CrossSiteAccessPolicies.FromJson(__jsonCrossSiteAccessPolicies) : CrossSiteAccessPolicy;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_scaleUnit = If( json?.PropertyT("scaleUnits"), out var __jsonScaleUnits) ? (int)__jsonScaleUnits : ScaleUnit;} + {_availabilitySetName = If( json?.PropertyT("availabilitySetName"), out var __jsonAvailabilitySetName) ? (string)__jsonAvailabilitySetName : (string)AvailabilitySetName;} + {_maxCacheAge = If( json?.PropertyT("maxCacheAge"), out var __jsonMaxCacheAge) ? (long?)__jsonMaxCacheAge : MaxCacheAge;} + {_customHostName = If( json?.PropertyT("customHostNames"), out var __jsonCustomHostNames) ? If( __jsonCustomHostNames as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : CustomHostName;} + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + {_cdnEnabled = If( json?.PropertyT("cdnEnabled"), out var __jsonCdnEnabled) ? (bool?)__jsonCdnEnabled : CdnEnabled;} + {_cdnProvider = If( json?.PropertyT("cdnProvider"), out var __jsonCdnProvider) ? (string)__jsonCdnProvider : (string)CdnProvider;} + {_cdnProfile = If( json?.PropertyT("cdnProfile"), out var __jsonCdnProfile) ? (string)__jsonCdnProfile : (string)CdnProfile;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_resourceState = If( json?.PropertyT("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState;} + {_freeTrialEndTime = If( json?.PropertyT("freeTrialEndTime"), out var __jsonFreeTrialEndTime) ? global::System.DateTime.TryParse((string)__jsonFreeTrialEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonFreeTrialEndTimeValue) ? __jsonFreeTrialEndTimeValue : FreeTrialEndTime : FreeTrialEndTime;} + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_lastModified = If( json?.PropertyT("lastModified"), out var __jsonLastModified) ? global::System.DateTime.TryParse((string)__jsonLastModified, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedValue) ? __jsonLastModifiedValue : LastModified : LastModified;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._accessControl ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._accessControl.ToJson(null,serializationMode) : null, "accessControl" ,container.Add ); + AddIf( null != this._crossSiteAccessPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._crossSiteAccessPolicy.ToJson(null,serializationMode) : null, "crossSiteAccessPolicies" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber(this._scaleUnit), "scaleUnits" ,container.Add ); + AddIf( null != (((object)this._availabilitySetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._availabilitySetName.ToString()) : null, "availabilitySetName" ,container.Add ); + AddIf( null != this._maxCacheAge ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((long)this._maxCacheAge) : null, "maxCacheAge" ,container.Add ); + if (null != this._customHostName) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._customHostName ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("customHostNames",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + } + AddIf( null != this._cdnEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean((bool)this._cdnEnabled) : null, "cdnEnabled" ,container.Add ); + AddIf( null != (((object)this._cdnProvider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._cdnProvider.ToString()) : null, "cdnProvider" ,container.Add ); + AddIf( null != (((object)this._cdnProfile)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._cdnProfile.ToString()) : null, "cdnProfile" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._resourceState.ToString()) : null, "resourceState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._freeTrialEndTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._freeTrialEndTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "freeTrialEndTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._lastModified ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._lastModified?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModified" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointSkuInfoListResult.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointSkuInfoListResult.cs new file mode 100644 index 000000000000..83da7ca2b715 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointSkuInfoListResult.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class StreamingEndpointSkuInfoListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointSkuInfoListResult, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointSkuInfoListResultInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo[] _value; + + /// The result of the List StreamingEndpoint skus. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public StreamingEndpointSkuInfoListResult() + { + + } + } + public partial interface IStreamingEndpointSkuInfoListResult : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The result of the List StreamingEndpoint skus. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The result of the List StreamingEndpoint skus.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo[] Value { get; set; } + + } + internal partial interface IStreamingEndpointSkuInfoListResultInternal + + { + /// The result of the List StreamingEndpoint skus. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointSkuInfoListResult.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointSkuInfoListResult.json.cs new file mode 100644 index 000000000000..2ac2dc186130 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEndpointSkuInfoListResult.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class StreamingEndpointSkuInfoListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointSkuInfoListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointSkuInfoListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEndpointSkuInfoListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingEndpointSkuInfoListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingEndpointSkuInfoListResult(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IArmStreamingEndpointSkuInfo) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ArmStreamingEndpointSkuInfo.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEntityScaleUnit.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEntityScaleUnit.cs new file mode 100644 index 000000000000..27a0bbf96fd2 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEntityScaleUnit.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// scale units definition + public partial class StreamingEntityScaleUnit : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEntityScaleUnit, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEntityScaleUnitInternal + { + + /// Backing field for property. + private int? _scaleUnit; + + /// The scale unit number of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? ScaleUnit { get => this._scaleUnit; set => this._scaleUnit = value; } + + /// Creates an new instance. + public StreamingEntityScaleUnit() + { + + } + } + /// scale units definition + public partial interface IStreamingEntityScaleUnit : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The scale unit number of the streaming endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The scale unit number of the streaming endpoint.", + SerializedName = @"scaleUnit", + PossibleTypes = new [] { typeof(int) })] + int? ScaleUnit { get; set; } + + } + /// scale units definition + internal partial interface IStreamingEntityScaleUnitInternal + + { + /// The scale unit number of the streaming endpoint. + int? ScaleUnit { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEntityScaleUnit.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEntityScaleUnit.json.cs new file mode 100644 index 000000000000..34f50b2640e6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingEntityScaleUnit.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// scale units definition + public partial class StreamingEntityScaleUnit + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEntityScaleUnit. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEntityScaleUnit. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingEntityScaleUnit FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingEntityScaleUnit(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingEntityScaleUnit(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_scaleUnit = If( json?.PropertyT("scaleUnit"), out var __jsonScaleUnit) ? (int?)__jsonScaleUnit : ScaleUnit;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._scaleUnit ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNumber((int)this._scaleUnit) : null, "scaleUnit" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocator.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocator.cs new file mode 100644 index 000000000000..2b70a8819ce9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocator.cs @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Streaming Locator resource + public partial class StreamingLocator : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// Alternative Media ID of this Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string AlternativeMediaId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).AlternativeMediaId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).AlternativeMediaId = value ?? null; } + + /// Asset Name + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string AssetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).AssetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).AssetName = value ?? null; } + + /// The ContentKeys used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] ContentKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).ContentKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).ContentKey = value ?? null /* arrayOf */; } + + /// The creation time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).Created; } + + /// Name of the default ContentKeyPolicy used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultContentKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).DefaultContentKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).DefaultContentKeyPolicyName = value ?? null; } + + /// The end time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).EndTime = value ?? default(global::System.DateTime); } + + /// A list of asset or account filters which apply to this streaming locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string[] Filter { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).Filter; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).Filter = value ?? null /* arrayOf */; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorInternal.Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).Created; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).Created = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingLocatorProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorProperties _property; + + /// Properties of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingLocatorProperties()); set => this._property = value; } + + /// The start time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).StartTime = value ?? default(global::System.DateTime); } + + /// The StreamingLocatorId of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string StreamingLocatorId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).StreamingLocatorId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).StreamingLocatorId = value ?? null; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string StreamingPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).StreamingPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal)Property).StreamingPolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public StreamingLocator() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// A Streaming Locator resource + public partial interface IStreamingLocator : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// Alternative Media ID of this Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Alternative Media ID of this Streaming Locator", + SerializedName = @"alternativeMediaId", + PossibleTypes = new [] { typeof(string) })] + string AlternativeMediaId { get; set; } + /// Asset Name + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Asset Name", + SerializedName = @"assetName", + PossibleTypes = new [] { typeof(string) })] + string AssetName { get; set; } + /// The ContentKeys used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ContentKeys used by this Streaming Locator.", + SerializedName = @"contentKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] ContentKey { get; set; } + /// The creation time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation time of the Streaming Locator.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// Name of the default ContentKeyPolicy used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the default ContentKeyPolicy used by this Streaming Locator.", + SerializedName = @"defaultContentKeyPolicyName", + PossibleTypes = new [] { typeof(string) })] + string DefaultContentKeyPolicyName { get; set; } + /// The end time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time of the Streaming Locator.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// A list of asset or account filters which apply to this streaming locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of asset or account filters which apply to this streaming locator", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(string) })] + string[] Filter { get; set; } + /// The start time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the Streaming Locator.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// The StreamingLocatorId of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The StreamingLocatorId of the Streaming Locator.", + SerializedName = @"streamingLocatorId", + PossibleTypes = new [] { typeof(string) })] + string StreamingLocatorId { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"streamingPolicyName", + PossibleTypes = new [] { typeof(string) })] + string StreamingPolicyName { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// A Streaming Locator resource + internal partial interface IStreamingLocatorInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// Alternative Media ID of this Streaming Locator + string AlternativeMediaId { get; set; } + /// Asset Name + string AssetName { get; set; } + /// The ContentKeys used by this Streaming Locator. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] ContentKey { get; set; } + /// The creation time of the Streaming Locator. + global::System.DateTime? Created { get; set; } + /// Name of the default ContentKeyPolicy used by this Streaming Locator. + string DefaultContentKeyPolicyName { get; set; } + /// The end time of the Streaming Locator. + global::System.DateTime? EndTime { get; set; } + /// A list of asset or account filters which apply to this streaming locator + string[] Filter { get; set; } + /// Properties of the Streaming Locator. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorProperties Property { get; set; } + /// The start time of the Streaming Locator. + global::System.DateTime? StartTime { get; set; } + /// The StreamingLocatorId of the Streaming Locator. + string StreamingLocatorId { get; set; } + /// + /// 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' + /// + string StreamingPolicyName { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocator.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocator.json.cs new file mode 100644 index 000000000000..390cb902ea56 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocator.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Streaming Locator resource + public partial class StreamingLocator + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingLocator(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingLocator(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingLocatorProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorCollection.cs new file mode 100644 index 000000000000..0ec9ce01a5c5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of StreamingLocator items. + public partial class StreamingLocatorCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorCollectionInternal + { + + /// Backing field for property. + private string _odataNextLink; + + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator[] _value; + + /// A collection of StreamingLocator items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public StreamingLocatorCollection() + { + + } + } + /// A collection of StreamingLocator items. + public partial interface IStreamingLocatorCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A link to the next page of the collection (when the collection contains too many results to return in one response).", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// A collection of StreamingLocator items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of StreamingLocator items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator[] Value { get; set; } + + } + /// A collection of StreamingLocator items. + internal partial interface IStreamingLocatorCollectionInternal + + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + string OdataNextLink { get; set; } + /// A collection of StreamingLocator items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorCollection.json.cs new file mode 100644 index 000000000000..658de70817c5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorCollection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of StreamingLocator items. + public partial class StreamingLocatorCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingLocatorCollection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingLocatorCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocator) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingLocator.FromJson(__u) )) ))() : null : Value;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorContentKey.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorContentKey.cs new file mode 100644 index 000000000000..86a02b9d14b9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorContentKey.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for content key in Streaming Locator + public partial class StreamingLocatorContentKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKeyInternal + { + + /// Backing field for property. + private string _id; + + /// ID of Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _labelReferenceInStreamingPolicy; + + /// Label of Content Key as specified in the Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string LabelReferenceInStreamingPolicy { get => this._labelReferenceInStreamingPolicy; set => this._labelReferenceInStreamingPolicy = value; } + + /// Internal Acessors for PolicyName + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKeyInternal.PolicyName { get => this._policyName; set { {_policyName = value;} } } + + /// Internal Acessors for Track + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKeyInternal.Track { get => this._track; set { {_track = value;} } } + + /// Internal Acessors for Type + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKeyInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _policyName; + + /// ContentKeyPolicy used by Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PolicyName { get => this._policyName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] _track; + + /// Tracks which use this Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] Track { get => this._track; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType? _type; + + /// Encryption type of Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType? Type { get => this._type; } + + /// Backing field for property. + private string _value; + + /// Value of Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public StreamingLocatorContentKey() + { + + } + } + /// Class for content key in Streaming Locator + public partial interface IStreamingLocatorContentKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// ID of Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"ID of Content Key", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// Label of Content Key as specified in the Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label of Content Key as specified in the Streaming Policy", + SerializedName = @"labelReferenceInStreamingPolicy", + PossibleTypes = new [] { typeof(string) })] + string LabelReferenceInStreamingPolicy { get; set; } + /// ContentKeyPolicy used by Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"ContentKeyPolicy used by Content Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; } + /// Tracks which use this Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Tracks which use this Content Key", + SerializedName = @"tracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] Track { get; } + /// Encryption type of Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Encryption type of Content Key", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType? Type { get; } + /// Value of Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value of Content Key", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// Class for content key in Streaming Locator + internal partial interface IStreamingLocatorContentKeyInternal + + { + /// ID of Content Key + string Id { get; set; } + /// Label of Content Key as specified in the Streaming Policy + string LabelReferenceInStreamingPolicy { get; set; } + /// ContentKeyPolicy used by Content Key + string PolicyName { get; set; } + /// Tracks which use this Content Key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] Track { get; set; } + /// Encryption type of Content Key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType? Type { get; set; } + /// Value of Content Key + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorContentKey.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorContentKey.json.cs new file mode 100644 index 000000000000..038af74116d0 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorContentKey.json.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class for content key in Streaming Locator + public partial class StreamingLocatorContentKey + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingLocatorContentKey(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingLocatorContentKey(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_labelReferenceInStreamingPolicy = If( json?.PropertyT("labelReferenceInStreamingPolicy"), out var __jsonLabelReferenceInStreamingPolicy) ? (string)__jsonLabelReferenceInStreamingPolicy : (string)LabelReferenceInStreamingPolicy;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + {_policyName = If( json?.PropertyT("policyName"), out var __jsonPolicyName) ? (string)__jsonPolicyName : (string)PolicyName;} + {_track = If( json?.PropertyT("tracks"), out var __jsonTracks) ? If( __jsonTracks as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackSelection.FromJson(__u) )) ))() : null : Track;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AddIf( null != (((object)this._labelReferenceInStreamingPolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._labelReferenceInStreamingPolicy.ToString()) : null, "labelReferenceInStreamingPolicy" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._track) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._track ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tracks",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorProperties.cs new file mode 100644 index 000000000000..94292c3a580a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorProperties.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the Streaming Locator. + public partial class StreamingLocatorProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal + { + + /// Backing field for property. + private string _alternativeMediaId; + + /// Alternative Media ID of this Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AlternativeMediaId { get => this._alternativeMediaId; set => this._alternativeMediaId = value; } + + /// Backing field for property. + private string _assetName; + + /// Asset Name + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AssetName { get => this._assetName; set => this._assetName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] _contentKey; + + /// The ContentKeys used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] ContentKey { get => this._contentKey; set => this._contentKey = value; } + + /// Backing field for property. + private global::System.DateTime? _created; + + /// The creation time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private string _defaultContentKeyPolicyName; + + /// Name of the default ContentKeyPolicy used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DefaultContentKeyPolicyName { get => this._defaultContentKeyPolicyName; set => this._defaultContentKeyPolicyName = value; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// The end time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private string[] _filter; + + /// A list of asset or account filters which apply to this streaming locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] Filter { get => this._filter; set => this._filter = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorPropertiesInternal.Created { get => this._created; set { {_created = value;} } } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// The start time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private string _streamingLocatorId; + + /// The StreamingLocatorId of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string StreamingLocatorId { get => this._streamingLocatorId; set => this._streamingLocatorId = value; } + + /// Backing field for property. + private string _streamingPolicyName; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string StreamingPolicyName { get => this._streamingPolicyName; set => this._streamingPolicyName = value; } + + /// Creates an new instance. + public StreamingLocatorProperties() + { + + } + } + /// Properties of the Streaming Locator. + public partial interface IStreamingLocatorProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Alternative Media ID of this Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Alternative Media ID of this Streaming Locator", + SerializedName = @"alternativeMediaId", + PossibleTypes = new [] { typeof(string) })] + string AlternativeMediaId { get; set; } + /// Asset Name + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Asset Name", + SerializedName = @"assetName", + PossibleTypes = new [] { typeof(string) })] + string AssetName { get; set; } + /// The ContentKeys used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ContentKeys used by this Streaming Locator.", + SerializedName = @"contentKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] ContentKey { get; set; } + /// The creation time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The creation time of the Streaming Locator.", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// Name of the default ContentKeyPolicy used by this Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the default ContentKeyPolicy used by this Streaming Locator.", + SerializedName = @"defaultContentKeyPolicyName", + PossibleTypes = new [] { typeof(string) })] + string DefaultContentKeyPolicyName { get; set; } + /// The end time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time of the Streaming Locator.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// A list of asset or account filters which apply to this streaming locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of asset or account filters which apply to this streaming locator", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(string) })] + string[] Filter { get; set; } + /// The start time of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the Streaming Locator.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// The StreamingLocatorId of the Streaming Locator. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The StreamingLocatorId of the Streaming Locator.", + SerializedName = @"streamingLocatorId", + PossibleTypes = new [] { typeof(string) })] + string StreamingLocatorId { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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'", + SerializedName = @"streamingPolicyName", + PossibleTypes = new [] { typeof(string) })] + string StreamingPolicyName { get; set; } + + } + /// Properties of the Streaming Locator. + internal partial interface IStreamingLocatorPropertiesInternal + + { + /// Alternative Media ID of this Streaming Locator + string AlternativeMediaId { get; set; } + /// Asset Name + string AssetName { get; set; } + /// The ContentKeys used by this Streaming Locator. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey[] ContentKey { get; set; } + /// The creation time of the Streaming Locator. + global::System.DateTime? Created { get; set; } + /// Name of the default ContentKeyPolicy used by this Streaming Locator. + string DefaultContentKeyPolicyName { get; set; } + /// The end time of the Streaming Locator. + global::System.DateTime? EndTime { get; set; } + /// A list of asset or account filters which apply to this streaming locator + string[] Filter { get; set; } + /// The start time of the Streaming Locator. + global::System.DateTime? StartTime { get; set; } + /// The StreamingLocatorId of the Streaming Locator. + string StreamingLocatorId { get; set; } + /// + /// 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' + /// + string StreamingPolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorProperties.json.cs new file mode 100644 index 000000000000..29aea51137d1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingLocatorProperties.json.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Properties of the Streaming Locator. + public partial class StreamingLocatorProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingLocatorProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingLocatorProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_assetName = If( json?.PropertyT("assetName"), out var __jsonAssetName) ? (string)__jsonAssetName : (string)AssetName;} + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_streamingLocatorId = If( json?.PropertyT("streamingLocatorId"), out var __jsonStreamingLocatorId) ? (string)__jsonStreamingLocatorId : (string)StreamingLocatorId;} + {_streamingPolicyName = If( json?.PropertyT("streamingPolicyName"), out var __jsonStreamingPolicyName) ? (string)__jsonStreamingPolicyName : (string)StreamingPolicyName;} + {_defaultContentKeyPolicyName = If( json?.PropertyT("defaultContentKeyPolicyName"), out var __jsonDefaultContentKeyPolicyName) ? (string)__jsonDefaultContentKeyPolicyName : (string)DefaultContentKeyPolicyName;} + {_contentKey = If( json?.PropertyT("contentKeys"), out var __jsonContentKeys) ? If( __jsonContentKeys as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingLocatorContentKey) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingLocatorContentKey.FromJson(__u) )) ))() : null : ContentKey;} + {_alternativeMediaId = If( json?.PropertyT("alternativeMediaId"), out var __jsonAlternativeMediaId) ? (string)__jsonAlternativeMediaId : (string)AlternativeMediaId;} + {_filter = If( json?.PropertyT("filters"), out var __jsonFilters) ? If( __jsonFilters as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : Filter;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._assetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._assetName.ToString()) : null, "assetName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AddIf( null != (((object)this._streamingLocatorId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingLocatorId.ToString()) : null, "streamingLocatorId" ,container.Add ); + AddIf( null != (((object)this._streamingPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingPolicyName.ToString()) : null, "streamingPolicyName" ,container.Add ); + AddIf( null != (((object)this._defaultContentKeyPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._defaultContentKeyPolicyName.ToString()) : null, "defaultContentKeyPolicyName" ,container.Add ); + if (null != this._contentKey) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._contentKey ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("contentKeys",__w); + } + AddIf( null != (((object)this._alternativeMediaId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._alternativeMediaId.ToString()) : null, "alternativeMediaId" ,container.Add ); + if (null != this._filter) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __s in this._filter ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("filters",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPath.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPath.cs new file mode 100644 index 000000000000..e4c6de9d4255 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPath.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class of paths for streaming + public partial class StreamingPath : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPathInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme _encryptionScheme; + + /// Encryption scheme + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme EncryptionScheme { get => this._encryptionScheme; set => this._encryptionScheme = value; } + + /// Backing field for property. + private string[] _path; + + /// Streaming paths for each protocol and encryptionScheme pair + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string[] Path { get => this._path; set => this._path = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol _streamingProtocol; + + /// Streaming protocol + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol StreamingProtocol { get => this._streamingProtocol; set => this._streamingProtocol = value; } + + /// Creates an new instance. + public StreamingPath() + { + + } + } + /// Class of paths for streaming + public partial interface IStreamingPath : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Encryption scheme + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Encryption scheme", + SerializedName = @"encryptionScheme", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme EncryptionScheme { get; set; } + /// Streaming paths for each protocol and encryptionScheme pair + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Streaming paths for each protocol and encryptionScheme pair", + SerializedName = @"paths", + PossibleTypes = new [] { typeof(string) })] + string[] Path { get; set; } + /// Streaming protocol + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Streaming protocol", + SerializedName = @"streamingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol StreamingProtocol { get; set; } + + } + /// Class of paths for streaming + internal partial interface IStreamingPathInternal + + { + /// Encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme EncryptionScheme { get; set; } + /// Streaming paths for each protocol and encryptionScheme pair + string[] Path { get; set; } + /// Streaming protocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol StreamingProtocol { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPath.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPath.json.cs new file mode 100644 index 000000000000..4984d9b7a580 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPath.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class of paths for streaming + public partial class StreamingPath + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPath FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingPath(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingPath(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_streamingProtocol = If( json?.PropertyT("streamingProtocol"), out var __jsonStreamingProtocol) ? (string)__jsonStreamingProtocol : (string)StreamingProtocol;} + {_encryptionScheme = If( json?.PropertyT("encryptionScheme"), out var __jsonEncryptionScheme) ? (string)__jsonEncryptionScheme : (string)EncryptionScheme;} + {_path = If( json?.PropertyT("paths"), out var __jsonPaths) ? If( __jsonPaths as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Path;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._streamingProtocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingProtocol.ToString()) : null, "streamingProtocol" ,container.Add ); + AddIf( null != (((object)this._encryptionScheme)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._encryptionScheme.ToString()) : null, "encryptionScheme" ,container.Add ); + if (null != this._path) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._path ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("paths",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicy.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicy.cs new file mode 100644 index 000000000000..324b6fc39193 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicy.cs @@ -0,0 +1,1023 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Streaming Policy resource + public partial class StreamingPolicy : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(); + + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCbcClearTrack { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcClearTrack; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcClearTrack = value ?? null /* arrayOf */; } + + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate = value ?? null; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsContentKeysDefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsContentKeysDefaultKeyLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsContentKeysDefaultKeyLabel = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsContentKeysDefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsContentKeysDefaultKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsContentKeysDefaultKeyPolicyName = value ?? null; } + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCbcsContentKeysKeyToTrackMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsContentKeysKeyToTrackMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsContentKeysKeyToTrackMapping = value ?? null /* arrayOf */; } + + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsDrmPlayReadyCustomAttribute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmPlayReadyCustomAttribute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmPlayReadyCustomAttribute = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmPlayReadyCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmPlayReadyCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsDrmWidevineCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmWidevineCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmWidevineCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCbcsEnabledProtocolsDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsEnabledProtocolsDash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsEnabledProtocolsDash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCbcsEnabledProtocolsDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsEnabledProtocolsDownload; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsEnabledProtocolsDownload = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCbcsEnabledProtocolsHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsEnabledProtocolsHl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsEnabledProtocolsHl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCbcsEnabledProtocolsSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsEnabledProtocolsSmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsEnabledProtocolsSmoothStreaming = value ?? default(bool); } + + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate = value ?? null; } + + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCencClearTrack { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencClearTrack; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencClearTrack = value ?? null /* arrayOf */; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencContentKeysDefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKeysDefaultKeyLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKeysDefaultKeyLabel = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencContentKeysDefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKeysDefaultKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKeysDefaultKeyPolicyName = value ?? null; } + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCencContentKeysKeyToTrackMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKeysKeyToTrackMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKeysKeyToTrackMapping = value ?? null /* arrayOf */; } + + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencDrmPlayReadyCustomAttribute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmPlayReadyCustomAttribute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmPlayReadyCustomAttribute = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmPlayReadyCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmPlayReadyCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencDrmWidevineCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmWidevineCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmWidevineCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCencEnabledProtocolsDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocolsDash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocolsDash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCencEnabledProtocolsDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocolsDownload; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocolsDownload = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCencEnabledProtocolsHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocolsHl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocolsHl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCencEnabledProtocolsSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocolsSmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocolsSmoothStreaming = value ?? default(bool); } + + /// Creation time of Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).Created; } + + /// Default ContentKey used by current Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultContentKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).DefaultContentKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).DefaultContentKeyPolicyName = value ?? null; } + + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] EnvelopeEncryptionClearTrack { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionClearTrack; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionClearTrack = value ?? null /* arrayOf */; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EnvelopeEncryptionContentKeysDefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKeysDefaultKeyLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKeysDefaultKeyLabel = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EnvelopeEncryptionContentKeysDefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKeysDefaultKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKeysDefaultKeyPolicyName = value ?? null; } + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] EnvelopeEncryptionContentKeysKeyToTrackMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKeysKeyToTrackMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKeysKeyToTrackMapping = value ?? null /* arrayOf */; } + + /// + /// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services + /// for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific + /// to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EnvelopeEncryptionCustomKeyAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionCustomKeyAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionCustomKeyAcquisitionUrlTemplate = value ?? null; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnvelopeEncryptionEnabledProtocolsDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocolsDash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocolsDash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnvelopeEncryptionEnabledProtocolsDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocolsDownload; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocolsDownload = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnvelopeEncryptionEnabledProtocolsHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocolsHl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocolsHl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnvelopeEncryptionEnabledProtocolsSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocolsSmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocolsSmoothStreaming = value ?? default(bool); } + + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? FairPlayAllowPersistentLicense { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).FairPlayAllowPersistentLicense; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).FairPlayAllowPersistentLicense = value ?? default(bool); } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string FairPlayCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).FairPlayCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).FairPlayCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for CommonEncryptionCbc + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCbc { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbc; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbc = value; } + + /// Internal Acessors for CommonEncryptionCbcClearKeyEncryptionConfiguration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCbcClearKeyEncryptionConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcClearKeyEncryptionConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcClearKeyEncryptionConfiguration = value; } + + /// Internal Acessors for CommonEncryptionCbcContentKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCbcContentKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcContentKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcContentKey = value; } + + /// Internal Acessors for CommonEncryptionCbcDrm + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCbcDrm { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcDrm; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcDrm = value; } + + /// Internal Acessors for CommonEncryptionCbcEnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCbcEnabledProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcEnabledProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcEnabledProtocol = value; } + + /// Internal Acessors for CommonEncryptionCbcsContentKeysDefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCbcsContentKeysDefaultKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsContentKeysDefaultKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsContentKeysDefaultKey = value; } + + /// Internal Acessors for CommonEncryptionCbcsDrmPlayReady + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCbcsDrmPlayReady { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmPlayReady; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmPlayReady = value; } + + /// Internal Acessors for CommonEncryptionCbcsDrmWidevine + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCbcsDrmWidevine { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmWidevine; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCbcsDrmWidevine = value; } + + /// Internal Acessors for CommonEncryptionCenc + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCenc { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCenc; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCenc = value; } + + /// Internal Acessors for CommonEncryptionCencClearKeyEncryptionConfiguration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCencClearKeyEncryptionConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencClearKeyEncryptionConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencClearKeyEncryptionConfiguration = value; } + + /// Internal Acessors for CommonEncryptionCencContentKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCencContentKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKey = value; } + + /// Internal Acessors for CommonEncryptionCencContentKeysDefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCencContentKeysDefaultKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKeysDefaultKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencContentKeysDefaultKey = value; } + + /// Internal Acessors for CommonEncryptionCencDrm + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCencDrm { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrm; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrm = value; } + + /// Internal Acessors for CommonEncryptionCencDrmPlayReady + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCencDrmPlayReady { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmPlayReady; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmPlayReady = value; } + + /// Internal Acessors for CommonEncryptionCencDrmWidevine + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCencDrmWidevine { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmWidevine; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencDrmWidevine = value; } + + /// Internal Acessors for CommonEncryptionCencEnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.CommonEncryptionCencEnabledProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).CommonEncryptionCencEnabledProtocol = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.Created { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).Created; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).Created = value; } + + /// Internal Acessors for DrmFairPlay + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.DrmFairPlay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).DrmFairPlay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).DrmFairPlay = value; } + + /// Internal Acessors for EnvelopeEncryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.EnvelopeEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryption = value; } + + /// Internal Acessors for EnvelopeEncryptionContentKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.EnvelopeEncryptionContentKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKey = value; } + + /// Internal Acessors for EnvelopeEncryptionContentKeysDefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.EnvelopeEncryptionContentKeysDefaultKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKeysDefaultKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionContentKeysDefaultKey = value; } + + /// Internal Acessors for EnvelopeEncryptionEnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.EnvelopeEncryptionEnabledProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).EnvelopeEncryptionEnabledProtocol = value; } + + /// Internal Acessors for NoEncryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.NoEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryption = value; } + + /// Internal Acessors for NoEncryptionEnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.NoEncryptionEnabledProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocol = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyProperties Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Name; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? NoEncryptionEnabledProtocolsDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocolsDash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocolsDash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? NoEncryptionEnabledProtocolsDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocolsDownload; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocolsDownload = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? NoEncryptionEnabledProtocolsHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocolsHl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocolsHl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? NoEncryptionEnabledProtocolsSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocolsSmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal)Property).NoEncryptionEnabledProtocolsSmoothStreaming = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyProperties _property; + + /// Class to specify properties of Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyProperties()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public StreamingPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// A Streaming Policy resource + public partial interface IStreamingPolicy : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResource + { + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing which tracks should not be encrypted", + SerializedName = @"clearTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCbcClearTrack { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId.", + SerializedName = @"customKeysAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCbcsContentKeysKeyToTrackMapping { get; set; } + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom attributes for PlayReady", + SerializedName = @"playReadyCustomAttributes", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsDrmPlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsDrmWidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCbcsEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCbcsEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCbcsEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCbcsEnabledProtocolsSmoothStreaming { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId.", + SerializedName = @"customKeysAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing which tracks should not be encrypted", + SerializedName = @"clearTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCencClearTrack { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCencContentKeysKeyToTrackMapping { get; set; } + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom attributes for PlayReady", + SerializedName = @"playReadyCustomAttributes", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencDrmPlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencDrmWidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCencEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCencEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCencEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCencEnabledProtocolsSmoothStreaming { get; set; } + /// Creation time of Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Creation time of Streaming Policy", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// Default ContentKey used by current Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Default ContentKey used by current Streaming Policy", + SerializedName = @"defaultContentKeyPolicyName", + PossibleTypes = new [] { typeof(string) })] + string DefaultContentKeyPolicyName { get; set; } + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing which tracks should not be encrypted", + SerializedName = @"clearTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] EnvelopeEncryptionClearTrack { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string EnvelopeEncryptionContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string EnvelopeEncryptionContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] EnvelopeEncryptionContentKeysKeyToTrackMapping { get; set; } + /// + /// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services + /// for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific + /// to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customKeyAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string EnvelopeEncryptionCustomKeyAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? EnvelopeEncryptionEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? EnvelopeEncryptionEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? EnvelopeEncryptionEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? EnvelopeEncryptionEnabledProtocolsSmoothStreaming { get; set; } + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"All license to be persistent or not", + SerializedName = @"allowPersistentLicense", + PossibleTypes = new [] { typeof(bool) })] + bool? FairPlayAllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string FairPlayCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? NoEncryptionEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? NoEncryptionEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? NoEncryptionEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? NoEncryptionEnabledProtocolsSmoothStreaming { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// A Streaming Policy resource + internal partial interface IStreamingPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.IResourceInternal + { + /// Configuration of CommonEncryptionCbcs + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs CommonEncryptionCbc { get; set; } + /// + /// Optional configuration supporting ClearKey in CommonEncryptionCbcs encryption scheme. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration CommonEncryptionCbcClearKeyEncryptionConfiguration { get; set; } + /// Representing which tracks should not be encrypted + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCbcClearTrack { get; set; } + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys CommonEncryptionCbcContentKey { get; set; } + /// Configuration of DRMs for current encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration CommonEncryptionCbcDrm { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols CommonEncryptionCbcEnabledProtocol { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + string CommonEncryptionCbcsClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey CommonEncryptionCbcsContentKeysDefaultKey { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string CommonEncryptionCbcsContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + string CommonEncryptionCbcsContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCbcsContentKeysKeyToTrackMapping { get; set; } + /// PlayReady configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration CommonEncryptionCbcsDrmPlayReady { get; set; } + /// Custom attributes for PlayReady + string CommonEncryptionCbcsDrmPlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CommonEncryptionCbcsDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Widevine configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration CommonEncryptionCbcsDrmWidevine { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CommonEncryptionCbcsDrmWidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + bool? CommonEncryptionCbcsEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + bool? CommonEncryptionCbcsEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + bool? CommonEncryptionCbcsEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? CommonEncryptionCbcsEnabledProtocolsSmoothStreaming { get; set; } + /// Configuration of CommonEncryptionCenc + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc CommonEncryptionCenc { get; set; } + /// + /// Optional configuration supporting ClearKey in CommonEncryptionCenc encryption scheme. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration CommonEncryptionCencClearKeyEncryptionConfiguration { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + string CommonEncryptionCencClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Representing which tracks should not be encrypted + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCencClearTrack { get; set; } + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys CommonEncryptionCencContentKey { get; set; } + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey CommonEncryptionCencContentKeysDefaultKey { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string CommonEncryptionCencContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + string CommonEncryptionCencContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCencContentKeysKeyToTrackMapping { get; set; } + /// Configuration of DRMs for CommonEncryptionCenc encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration CommonEncryptionCencDrm { get; set; } + /// PlayReady configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration CommonEncryptionCencDrmPlayReady { get; set; } + /// Custom attributes for PlayReady + string CommonEncryptionCencDrmPlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CommonEncryptionCencDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Widevine configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration CommonEncryptionCencDrmWidevine { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CommonEncryptionCencDrmWidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols CommonEncryptionCencEnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? CommonEncryptionCencEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + bool? CommonEncryptionCencEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + bool? CommonEncryptionCencEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? CommonEncryptionCencEnabledProtocolsSmoothStreaming { get; set; } + /// Creation time of Streaming Policy + global::System.DateTime? Created { get; set; } + /// Default ContentKey used by current Streaming Policy + string DefaultContentKeyPolicyName { get; set; } + /// FairPlay configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration DrmFairPlay { get; set; } + /// Configuration of EnvelopeEncryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption EnvelopeEncryption { get; set; } + /// Representing which tracks should not be encrypted + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] EnvelopeEncryptionClearTrack { get; set; } + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys EnvelopeEncryptionContentKey { get; set; } + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey EnvelopeEncryptionContentKeysDefaultKey { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string EnvelopeEncryptionContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + string EnvelopeEncryptionContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] EnvelopeEncryptionContentKeysKeyToTrackMapping { get; set; } + /// + /// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services + /// for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific + /// to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. + /// + string EnvelopeEncryptionCustomKeyAcquisitionUrlTemplate { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnvelopeEncryptionEnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? EnvelopeEncryptionEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + bool? EnvelopeEncryptionEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + bool? EnvelopeEncryptionEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? EnvelopeEncryptionEnabledProtocolsSmoothStreaming { get; set; } + /// All license to be persistent or not + bool? FairPlayAllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string FairPlayCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Configurations of NoEncryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption NoEncryption { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols NoEncryptionEnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? NoEncryptionEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + bool? NoEncryptionEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + bool? NoEncryptionEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? NoEncryptionEnabledProtocolsSmoothStreaming { get; set; } + /// Class to specify properties of Streaming Policy + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyProperties Property { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicy.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicy.json.cs new file mode 100644 index 000000000000..34e830bb20a4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicy.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A Streaming Policy resource + public partial class StreamingPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingPolicy(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyCollection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyCollection.cs new file mode 100644 index 000000000000..df2b811d867e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of StreamingPolicy items. + public partial class StreamingPolicyCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyCollection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyCollectionInternal + { + + /// Backing field for property. + private string _odataNextLink; + + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataNextLink { get => this._odataNextLink; set => this._odataNextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy[] _value; + + /// A collection of StreamingPolicy items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public StreamingPolicyCollection() + { + + } + } + /// A collection of StreamingPolicy items. + public partial interface IStreamingPolicyCollection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A link to the next page of the collection (when the collection contains too many results to return in one response).", + SerializedName = @"@odata.nextLink", + PossibleTypes = new [] { typeof(string) })] + string OdataNextLink { get; set; } + /// A collection of StreamingPolicy items. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A collection of StreamingPolicy items.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy[] Value { get; set; } + + } + /// A collection of StreamingPolicy items. + internal partial interface IStreamingPolicyCollectionInternal + + { + /// + /// A link to the next page of the collection (when the collection contains too many results to return in one response). + /// + string OdataNextLink { get; set; } + /// A collection of StreamingPolicy items. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyCollection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyCollection.json.cs new file mode 100644 index 000000000000..6f2b9b97020f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyCollection.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// A collection of StreamingPolicy items. + public partial class StreamingPolicyCollection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingPolicyCollection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingPolicyCollection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicy) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicy.FromJson(__u) )) ))() : null : Value;} + {_odataNextLink = If( json?.PropertyT("@odata.nextLink"), out var __jsonOdataNextLink) ? (string)__jsonOdataNextLink : (string)OdataNextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._odataNextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataNextLink.ToString()) : null, "@odata.nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKey.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKey.cs new file mode 100644 index 000000000000..c7efd7e19324 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKey.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify properties of content key + public partial class StreamingPolicyContentKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeyInternal + { + + /// Backing field for property. + private string _label; + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Label { get => this._label; set => this._label = value; } + + /// Backing field for property. + private string _policyName; + + /// Policy used by Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PolicyName { get => this._policyName; set => this._policyName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] _track; + + /// Tracks which use this content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] Track { get => this._track; set => this._track = value; } + + /// Creates an new instance. + public StreamingPolicyContentKey() + { + + } + } + /// Class to specify properties of content key + public partial interface IStreamingPolicyContentKey : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string Label { get; set; } + /// Policy used by Content Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Content Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; set; } + /// Tracks which use this content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tracks which use this content key", + SerializedName = @"tracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] Track { get; set; } + + } + /// Class to specify properties of content key + internal partial interface IStreamingPolicyContentKeyInternal + + { + /// Label can be used to specify Content Key when creating a Streaming Locator + string Label { get; set; } + /// Policy used by Content Key + string PolicyName { get; set; } + /// Tracks which use this content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] Track { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKey.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKey.json.cs new file mode 100644 index 000000000000..4b67ccd961a8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKey.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify properties of content key + public partial class StreamingPolicyContentKey + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingPolicyContentKey(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingPolicyContentKey(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_label = If( json?.PropertyT("label"), out var __jsonLabel) ? (string)__jsonLabel : (string)Label;} + {_policyName = If( json?.PropertyT("policyName"), out var __jsonPolicyName) ? (string)__jsonPolicyName : (string)PolicyName;} + {_track = If( json?.PropertyT("tracks"), out var __jsonTracks) ? If( __jsonTracks as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackSelection.FromJson(__u) )) ))() : null : Track;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._label)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._label.ToString()) : null, "label" ,container.Add ); + AddIf( null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName" ,container.Add ); + if (null != this._track) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._track ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tracks",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKeys.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKeys.cs new file mode 100644 index 000000000000..aef4462f605f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKeys.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify properties of all content keys in Streaming Policy + public partial class StreamingPolicyContentKeys : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey _defaultKey; + + /// Default content key for an encryption scheme + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey DefaultKey { get => (this._defaultKey = this._defaultKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.DefaultKey()); set => this._defaultKey = value; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKeyInternal)DefaultKey).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKeyInternal)DefaultKey).Label = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string DefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKeyInternal)DefaultKey).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKeyInternal)DefaultKey).PolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] _keyToTrackMapping; + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] KeyToTrackMapping { get => this._keyToTrackMapping; set => this._keyToTrackMapping = value; } + + /// Internal Acessors for DefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeysInternal.DefaultKey { get => (this._defaultKey = this._defaultKey ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.DefaultKey()); set { {_defaultKey = value;} } } + + /// Creates an new instance. + public StreamingPolicyContentKeys() + { + + } + } + /// Class to specify properties of all content keys in Streaming Policy + public partial interface IStreamingPolicyContentKeys : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string DefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string DefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] KeyToTrackMapping { get; set; } + + } + /// Class to specify properties of all content keys in Streaming Policy + internal partial interface IStreamingPolicyContentKeysInternal + + { + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey DefaultKey { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string DefaultKeyLabel { get; set; } + /// Policy used by Default Key + string DefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] KeyToTrackMapping { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKeys.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKeys.json.cs new file mode 100644 index 000000000000..5c2031470001 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyContentKeys.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify properties of all content keys in Streaming Policy + public partial class StreamingPolicyContentKeys + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingPolicyContentKeys(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingPolicyContentKeys(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_defaultKey = If( json?.PropertyT("defaultKey"), out var __jsonDefaultKey) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.DefaultKey.FromJson(__jsonDefaultKey) : DefaultKey;} + {_keyToTrackMapping = If( json?.PropertyT("keyToTrackMappings"), out var __jsonKeyToTrackMappings) ? If( __jsonKeyToTrackMappings as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.StreamingPolicyContentKey.FromJson(__u) )) ))() : null : KeyToTrackMapping;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._defaultKey ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._defaultKey.ToJson(null,serializationMode) : null, "defaultKey" ,container.Add ); + if (null != this._keyToTrackMapping) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._keyToTrackMapping ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("keyToTrackMappings",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyFairPlayConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyFairPlayConfiguration.cs new file mode 100644 index 000000000000..6c98cc086968 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyFairPlayConfiguration.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify configurations of FairPlay in Streaming Policy + public partial class StreamingPolicyFairPlayConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfigurationInternal + { + + /// Backing field for property. + private bool _allowPersistentLicense; + + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public bool AllowPersistentLicense { get => this._allowPersistentLicense; set => this._allowPersistentLicense = value; } + + /// Backing field for property. + private string _customLicenseAcquisitionUrlTemplate; + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CustomLicenseAcquisitionUrlTemplate { get => this._customLicenseAcquisitionUrlTemplate; set => this._customLicenseAcquisitionUrlTemplate = value; } + + /// Creates an new instance. + public StreamingPolicyFairPlayConfiguration() + { + + } + } + /// Class to specify configurations of FairPlay in Streaming Policy + public partial interface IStreamingPolicyFairPlayConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"All license to be persistent or not", + SerializedName = @"allowPersistentLicense", + PossibleTypes = new [] { typeof(bool) })] + bool AllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CustomLicenseAcquisitionUrlTemplate { get; set; } + + } + /// Class to specify configurations of FairPlay in Streaming Policy + internal partial interface IStreamingPolicyFairPlayConfigurationInternal + + { + /// All license to be persistent or not + bool AllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CustomLicenseAcquisitionUrlTemplate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyFairPlayConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyFairPlayConfiguration.json.cs new file mode 100644 index 000000000000..2a0603d1282d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyFairPlayConfiguration.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify configurations of FairPlay in Streaming Policy + public partial class StreamingPolicyFairPlayConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingPolicyFairPlayConfiguration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingPolicyFairPlayConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_customLicenseAcquisitionUrlTemplate = If( json?.PropertyT("customLicenseAcquisitionUrlTemplate"), out var __jsonCustomLicenseAcquisitionUrlTemplate) ? (string)__jsonCustomLicenseAcquisitionUrlTemplate : (string)CustomLicenseAcquisitionUrlTemplate;} + {_allowPersistentLicense = If( json?.PropertyT("allowPersistentLicense"), out var __jsonAllowPersistentLicense) ? (bool)__jsonAllowPersistentLicense : AllowPersistentLicense;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._customLicenseAcquisitionUrlTemplate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._customLicenseAcquisitionUrlTemplate.ToString()) : null, "customLicenseAcquisitionUrlTemplate" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonBoolean(this._allowPersistentLicense), "allowPersistentLicense" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyPlayReadyConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyPlayReadyConfiguration.cs new file mode 100644 index 000000000000..b408ac9f0561 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyPlayReadyConfiguration.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify configurations of PlayReady in Streaming Policy + public partial class StreamingPolicyPlayReadyConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfigurationInternal + { + + /// Backing field for property. + private string _customLicenseAcquisitionUrlTemplate; + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CustomLicenseAcquisitionUrlTemplate { get => this._customLicenseAcquisitionUrlTemplate; set => this._customLicenseAcquisitionUrlTemplate = value; } + + /// Backing field for property. + private string _playReadyCustomAttribute; + + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string PlayReadyCustomAttribute { get => this._playReadyCustomAttribute; set => this._playReadyCustomAttribute = value; } + + /// Creates an new instance. + public StreamingPolicyPlayReadyConfiguration() + { + + } + } + /// Class to specify configurations of PlayReady in Streaming Policy + public partial interface IStreamingPolicyPlayReadyConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CustomLicenseAcquisitionUrlTemplate { get; set; } + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom attributes for PlayReady", + SerializedName = @"playReadyCustomAttributes", + PossibleTypes = new [] { typeof(string) })] + string PlayReadyCustomAttribute { get; set; } + + } + /// Class to specify configurations of PlayReady in Streaming Policy + internal partial interface IStreamingPolicyPlayReadyConfigurationInternal + + { + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CustomLicenseAcquisitionUrlTemplate { get; set; } + /// Custom attributes for PlayReady + string PlayReadyCustomAttribute { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyPlayReadyConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyPlayReadyConfiguration.json.cs new file mode 100644 index 000000000000..9b94a7482249 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyPlayReadyConfiguration.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify configurations of PlayReady in Streaming Policy + public partial class StreamingPolicyPlayReadyConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingPolicyPlayReadyConfiguration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingPolicyPlayReadyConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_customLicenseAcquisitionUrlTemplate = If( json?.PropertyT("customLicenseAcquisitionUrlTemplate"), out var __jsonCustomLicenseAcquisitionUrlTemplate) ? (string)__jsonCustomLicenseAcquisitionUrlTemplate : (string)CustomLicenseAcquisitionUrlTemplate;} + {_playReadyCustomAttribute = If( json?.PropertyT("playReadyCustomAttributes"), out var __jsonPlayReadyCustomAttributes) ? (string)__jsonPlayReadyCustomAttributes : (string)PlayReadyCustomAttribute;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._customLicenseAcquisitionUrlTemplate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._customLicenseAcquisitionUrlTemplate.ToString()) : null, "customLicenseAcquisitionUrlTemplate" ,container.Add ); + AddIf( null != (((object)this._playReadyCustomAttribute)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._playReadyCustomAttribute.ToString()) : null, "playReadyCustomAttributes" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyProperties.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyProperties.cs new file mode 100644 index 000000000000..0e4ebc4977aa --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyProperties.cs @@ -0,0 +1,905 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify properties of Streaming Policy + public partial class StreamingPolicyProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyProperties, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs _commonEncryptionCbc; + + /// Configuration of CommonEncryptionCbcs + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs CommonEncryptionCbc { get => (this._commonEncryptionCbc = this._commonEncryptionCbc ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CommonEncryptionCbcs()); set => this._commonEncryptionCbc = value; } + + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCbcClearTrack { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ClearTrack; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ClearTrack = value ?? null /* arrayOf */; } + + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate = value ?? null; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsContentKeysDefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DefaultKeyLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DefaultKeyLabel = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsContentKeysDefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DefaultKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DefaultKeyPolicyName = value ?? null; } + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCbcsContentKeysKeyToTrackMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ContentKeyToTrackMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ContentKeyToTrackMapping = value ?? null /* arrayOf */; } + + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsDrmPlayReadyCustomAttribute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).PlayReadyCustomAttribute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).PlayReadyCustomAttribute = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).PlayReadyCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).PlayReadyCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCbcsDrmWidevineCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).WidevineCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).WidevineCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCbcsEnabledProtocolsDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocolDash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocolDash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCbcsEnabledProtocolsDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocolDownload; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocolDownload = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCbcsEnabledProtocolsHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocolHl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocolHl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCbcsEnabledProtocolsSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocolSmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocolSmoothStreaming = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc _commonEncryptionCenc; + + /// Configuration of CommonEncryptionCenc + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc CommonEncryptionCenc { get => (this._commonEncryptionCenc = this._commonEncryptionCenc ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CommonEncryptionCenc()); set => this._commonEncryptionCenc = value; } + + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate = value ?? null; } + + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCencClearTrack { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ClearTrack; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ClearTrack = value ?? null /* arrayOf */; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencContentKeysDefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).DefaultKeyLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).DefaultKeyLabel = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencContentKeysDefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).DefaultKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).DefaultKeyPolicyName = value ?? null; } + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCencContentKeysKeyToTrackMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ContentKeyToTrackMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ContentKeyToTrackMapping = value ?? null /* arrayOf */; } + + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencDrmPlayReadyCustomAttribute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).PlayReadyCustomAttribute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).PlayReadyCustomAttribute = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).PlayReadyCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).PlayReadyCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string CommonEncryptionCencDrmWidevineCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).WidevineCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).WidevineCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCencEnabledProtocolsDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocolDash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocolDash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCencEnabledProtocolsDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocolDownload; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocolDownload = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCencEnabledProtocolsHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocolHl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocolHl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? CommonEncryptionCencEnabledProtocolsSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocolSmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocolSmoothStreaming = value ?? default(bool); } + + /// Backing field for property. + private global::System.DateTime? _created; + + /// Creation time of Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public global::System.DateTime? Created { get => this._created; } + + /// Backing field for property. + private string _defaultContentKeyPolicyName; + + /// Default ContentKey used by current Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DefaultContentKeyPolicyName { get => this._defaultContentKeyPolicyName; set => this._defaultContentKeyPolicyName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption _envelopeEncryption; + + /// Configuration of EnvelopeEncryption + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption EnvelopeEncryption { get => (this._envelopeEncryption = this._envelopeEncryption ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnvelopeEncryption()); set => this._envelopeEncryption = value; } + + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] EnvelopeEncryptionClearTrack { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).ClearTrack; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).ClearTrack = value ?? null /* arrayOf */; } + + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EnvelopeEncryptionContentKeysDefaultKeyLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).DefaultKeyLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).DefaultKeyLabel = value ?? null; } + + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EnvelopeEncryptionContentKeysDefaultKeyPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).DefaultKeyPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).DefaultKeyPolicyName = value ?? null; } + + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] EnvelopeEncryptionContentKeysKeyToTrackMapping { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).ContentKeyToTrackMapping; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).ContentKeyToTrackMapping = value ?? null /* arrayOf */; } + + /// + /// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services + /// for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific + /// to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string EnvelopeEncryptionCustomKeyAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).CustomKeyAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).CustomKeyAcquisitionUrlTemplate = value ?? null; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnvelopeEncryptionEnabledProtocolsDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocolDash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocolDash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnvelopeEncryptionEnabledProtocolsDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocolDownload; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocolDownload = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnvelopeEncryptionEnabledProtocolsHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocolHl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocolHl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? EnvelopeEncryptionEnabledProtocolsSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocolSmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocolSmoothStreaming = value ?? default(bool); } + + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? FairPlayAllowPersistentLicense { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).FairPlayAllowPersistentLicense; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).FairPlayAllowPersistentLicense = value ?? default(bool); } + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string FairPlayCustomLicenseAcquisitionUrlTemplate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).FairPlayCustomLicenseAcquisitionUrlTemplate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).FairPlayCustomLicenseAcquisitionUrlTemplate = value ?? null; } + + /// Internal Acessors for CommonEncryptionCbc + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCbc { get => (this._commonEncryptionCbc = this._commonEncryptionCbc ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CommonEncryptionCbcs()); set { {_commonEncryptionCbc = value;} } } + + /// Internal Acessors for CommonEncryptionCbcClearKeyEncryptionConfiguration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCbcClearKeyEncryptionConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ClearKeyEncryptionConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ClearKeyEncryptionConfiguration = value; } + + /// Internal Acessors for CommonEncryptionCbcContentKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCbcContentKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ContentKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ContentKey = value; } + + /// Internal Acessors for CommonEncryptionCbcDrm + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCbcDrm { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).Drm; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).Drm = value; } + + /// Internal Acessors for CommonEncryptionCbcEnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCbcEnabledProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).EnabledProtocol = value; } + + /// Internal Acessors for CommonEncryptionCbcsContentKeysDefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCbcsContentKeysDefaultKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ContentKeyDefaultKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).ContentKeyDefaultKey = value; } + + /// Internal Acessors for CommonEncryptionCbcsDrmPlayReady + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCbcsDrmPlayReady { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DrmPlayReady; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DrmPlayReady = value; } + + /// Internal Acessors for CommonEncryptionCbcsDrmWidevine + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCbcsDrmWidevine { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DrmWidevine; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DrmWidevine = value; } + + /// Internal Acessors for CommonEncryptionCenc + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCenc { get => (this._commonEncryptionCenc = this._commonEncryptionCenc ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CommonEncryptionCenc()); set { {_commonEncryptionCenc = value;} } } + + /// Internal Acessors for CommonEncryptionCencClearKeyEncryptionConfiguration + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCencClearKeyEncryptionConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ClearKeyEncryptionConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ClearKeyEncryptionConfiguration = value; } + + /// Internal Acessors for CommonEncryptionCencContentKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCencContentKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ContentKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ContentKey = value; } + + /// Internal Acessors for CommonEncryptionCencContentKeysDefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCencContentKeysDefaultKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ContentKeyDefaultKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).ContentKeyDefaultKey = value; } + + /// Internal Acessors for CommonEncryptionCencDrm + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCencDrm { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).Drm; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).Drm = value; } + + /// Internal Acessors for CommonEncryptionCencDrmPlayReady + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCencDrmPlayReady { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).DrmPlayReady; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).DrmPlayReady = value; } + + /// Internal Acessors for CommonEncryptionCencDrmWidevine + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCencDrmWidevine { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).DrmWidevine; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).DrmWidevine = value; } + + /// Internal Acessors for CommonEncryptionCencEnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.CommonEncryptionCencEnabledProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCencInternal)CommonEncryptionCenc).EnabledProtocol = value; } + + /// Internal Acessors for Created + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.Created { get => this._created; set { {_created = value;} } } + + /// Internal Acessors for DrmFairPlay + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.DrmFairPlay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DrmFairPlay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcsInternal)CommonEncryptionCbc).DrmFairPlay = value; } + + /// Internal Acessors for EnvelopeEncryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.EnvelopeEncryption { get => (this._envelopeEncryption = this._envelopeEncryption ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnvelopeEncryption()); set { {_envelopeEncryption = value;} } } + + /// Internal Acessors for EnvelopeEncryptionContentKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.EnvelopeEncryptionContentKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).ContentKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).ContentKey = value; } + + /// Internal Acessors for EnvelopeEncryptionContentKeysDefaultKey + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.EnvelopeEncryptionContentKeysDefaultKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).ContentKeyDefaultKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).ContentKeyDefaultKey = value; } + + /// Internal Acessors for EnvelopeEncryptionEnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.EnvelopeEncryptionEnabledProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryptionInternal)EnvelopeEncryption).EnabledProtocol = value; } + + /// Internal Acessors for NoEncryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.NoEncryption { get => (this._noEncryption = this._noEncryption ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.NoEncryption()); set { {_noEncryption = value;} } } + + /// Internal Acessors for NoEncryptionEnabledProtocol + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPropertiesInternal.NoEncryptionEnabledProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocol = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption _noEncryption; + + /// Configurations of NoEncryption + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption NoEncryption { get => (this._noEncryption = this._noEncryption ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.NoEncryption()); set => this._noEncryption = value; } + + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? NoEncryptionEnabledProtocolsDash { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocolDash; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocolDash = value ?? default(bool); } + + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? NoEncryptionEnabledProtocolsDownload { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocolDownload; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocolDownload = value ?? default(bool); } + + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? NoEncryptionEnabledProtocolsHl { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocolHl; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocolHl = value ?? default(bool); } + + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? NoEncryptionEnabledProtocolsSmoothStreaming { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocolSmoothStreaming; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryptionInternal)NoEncryption).EnabledProtocolSmoothStreaming = value ?? default(bool); } + + /// Creates an new instance. + public StreamingPolicyProperties() + { + + } + } + /// Class to specify properties of Streaming Policy + public partial interface IStreamingPolicyProperties : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing which tracks should not be encrypted", + SerializedName = @"clearTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCbcClearTrack { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId.", + SerializedName = @"customKeysAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCbcsContentKeysKeyToTrackMapping { get; set; } + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom attributes for PlayReady", + SerializedName = @"playReadyCustomAttributes", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsDrmPlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCbcsDrmWidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCbcsEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCbcsEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCbcsEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCbcsEnabledProtocolsSmoothStreaming { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId.", + SerializedName = @"customKeysAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing which tracks should not be encrypted", + SerializedName = @"clearTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCencClearTrack { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCencContentKeysKeyToTrackMapping { get; set; } + /// Custom attributes for PlayReady + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom attributes for PlayReady", + SerializedName = @"playReadyCustomAttributes", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencDrmPlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CommonEncryptionCencDrmWidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCencEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCencEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCencEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? CommonEncryptionCencEnabledProtocolsSmoothStreaming { get; set; } + /// Creation time of Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Creation time of Streaming Policy", + SerializedName = @"created", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Created { get; } + /// Default ContentKey used by current Streaming Policy + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Default ContentKey used by current Streaming Policy", + SerializedName = @"defaultContentKeyPolicyName", + PossibleTypes = new [] { typeof(string) })] + string DefaultContentKeyPolicyName { get; set; } + /// Representing which tracks should not be encrypted + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing which tracks should not be encrypted", + SerializedName = @"clearTracks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] EnvelopeEncryptionClearTrack { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Label can be used to specify Content Key when creating a Streaming Locator", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + string EnvelopeEncryptionContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy used by Default Key", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string EnvelopeEncryptionContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Representing tracks needs separate content key", + SerializedName = @"keyToTrackMappings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] EnvelopeEncryptionContentKeysKeyToTrackMapping { get; set; } + /// + /// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services + /// for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific + /// to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customKeyAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string EnvelopeEncryptionCustomKeyAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? EnvelopeEncryptionEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? EnvelopeEncryptionEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? EnvelopeEncryptionEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? EnvelopeEncryptionEnabledProtocolsSmoothStreaming { get; set; } + /// All license to be persistent or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"All license to be persistent or not", + SerializedName = @"allowPersistentLicense", + PossibleTypes = new [] { typeof(bool) })] + bool? FairPlayAllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string FairPlayCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable DASH protocol or not", + SerializedName = @"dash", + PossibleTypes = new [] { typeof(bool) })] + bool? NoEncryptionEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable Download protocol or not", + SerializedName = @"download", + PossibleTypes = new [] { typeof(bool) })] + bool? NoEncryptionEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable HLS protocol or not", + SerializedName = @"hls", + PossibleTypes = new [] { typeof(bool) })] + bool? NoEncryptionEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable SmoothStreaming protocol or not", + SerializedName = @"smoothStreaming", + PossibleTypes = new [] { typeof(bool) })] + bool? NoEncryptionEnabledProtocolsSmoothStreaming { get; set; } + + } + /// Class to specify properties of Streaming Policy + internal partial interface IStreamingPolicyPropertiesInternal + + { + /// Configuration of CommonEncryptionCbcs + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCbcs CommonEncryptionCbc { get; set; } + /// + /// Optional configuration supporting ClearKey in CommonEncryptionCbcs encryption scheme. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration CommonEncryptionCbcClearKeyEncryptionConfiguration { get; set; } + /// Representing which tracks should not be encrypted + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCbcClearTrack { get; set; } + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys CommonEncryptionCbcContentKey { get; set; } + /// Configuration of DRMs for current encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICbcsDrmConfiguration CommonEncryptionCbcDrm { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols CommonEncryptionCbcEnabledProtocol { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + string CommonEncryptionCbcsClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey CommonEncryptionCbcsContentKeysDefaultKey { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string CommonEncryptionCbcsContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + string CommonEncryptionCbcsContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCbcsContentKeysKeyToTrackMapping { get; set; } + /// PlayReady configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration CommonEncryptionCbcsDrmPlayReady { get; set; } + /// Custom attributes for PlayReady + string CommonEncryptionCbcsDrmPlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CommonEncryptionCbcsDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Widevine configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration CommonEncryptionCbcsDrmWidevine { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CommonEncryptionCbcsDrmWidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Enable DASH protocol or not + bool? CommonEncryptionCbcsEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + bool? CommonEncryptionCbcsEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + bool? CommonEncryptionCbcsEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? CommonEncryptionCbcsEnabledProtocolsSmoothStreaming { get; set; } + /// Configuration of CommonEncryptionCenc + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICommonEncryptionCenc CommonEncryptionCenc { get; set; } + /// + /// Optional configuration supporting ClearKey in CommonEncryptionCenc encryption scheme. + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IClearKeyEncryptionConfiguration CommonEncryptionCencClearKeyEncryptionConfiguration { get; set; } + /// + /// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure + /// Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime + /// with the value specific to the request. The currently supported token value is {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId. + /// + string CommonEncryptionCencClearKeyEncryptionConfigurationCustomKeysAcquisitionUrlTemplate { get; set; } + /// Representing which tracks should not be encrypted + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] CommonEncryptionCencClearTrack { get; set; } + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys CommonEncryptionCencContentKey { get; set; } + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey CommonEncryptionCencContentKeysDefaultKey { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string CommonEncryptionCencContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + string CommonEncryptionCencContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] CommonEncryptionCencContentKeysKeyToTrackMapping { get; set; } + /// Configuration of DRMs for CommonEncryptionCenc encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ICencDrmConfiguration CommonEncryptionCencDrm { get; set; } + /// PlayReady configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyPlayReadyConfiguration CommonEncryptionCencDrmPlayReady { get; set; } + /// Custom attributes for PlayReady + string CommonEncryptionCencDrmPlayReadyCustomAttribute { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CommonEncryptionCencDrmPlayReadyCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Widevine configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration CommonEncryptionCencDrmWidevine { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CommonEncryptionCencDrmWidevineCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols CommonEncryptionCencEnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? CommonEncryptionCencEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + bool? CommonEncryptionCencEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + bool? CommonEncryptionCencEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? CommonEncryptionCencEnabledProtocolsSmoothStreaming { get; set; } + /// Creation time of Streaming Policy + global::System.DateTime? Created { get; set; } + /// Default ContentKey used by current Streaming Policy + string DefaultContentKeyPolicyName { get; set; } + /// FairPlay configurations + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyFairPlayConfiguration DrmFairPlay { get; set; } + /// Configuration of EnvelopeEncryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnvelopeEncryption EnvelopeEncryption { get; set; } + /// Representing which tracks should not be encrypted + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection[] EnvelopeEncryptionClearTrack { get; set; } + /// + /// Representing default content key for each encryption scheme and separate content keys for specific tracks + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKeys EnvelopeEncryptionContentKey { get; set; } + /// Default content key for an encryption scheme + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IDefaultKey EnvelopeEncryptionContentKeysDefaultKey { get; set; } + /// Label can be used to specify Content Key when creating a Streaming Locator + string EnvelopeEncryptionContentKeysDefaultKeyLabel { get; set; } + /// Policy used by Default Key + string EnvelopeEncryptionContentKeysDefaultKeyPolicyName { get; set; } + /// Representing tracks needs separate content key + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyContentKey[] EnvelopeEncryptionContentKeysKeyToTrackMapping { get; set; } + /// + /// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services + /// for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific + /// to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. + /// + string EnvelopeEncryptionCustomKeyAcquisitionUrlTemplate { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols EnvelopeEncryptionEnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? EnvelopeEncryptionEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + bool? EnvelopeEncryptionEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + bool? EnvelopeEncryptionEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? EnvelopeEncryptionEnabledProtocolsSmoothStreaming { get; set; } + /// All license to be persistent or not + bool? FairPlayAllowPersistentLicense { get; set; } + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string FairPlayCustomLicenseAcquisitionUrlTemplate { get; set; } + /// Configurations of NoEncryption + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.INoEncryption NoEncryption { get; set; } + /// Representing supported protocols + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IEnabledProtocols NoEncryptionEnabledProtocol { get; set; } + /// Enable DASH protocol or not + bool? NoEncryptionEnabledProtocolsDash { get; set; } + /// Enable Download protocol or not + bool? NoEncryptionEnabledProtocolsDownload { get; set; } + /// Enable HLS protocol or not + bool? NoEncryptionEnabledProtocolsHl { get; set; } + /// Enable SmoothStreaming protocol or not + bool? NoEncryptionEnabledProtocolsSmoothStreaming { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyProperties.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyProperties.json.cs new file mode 100644 index 000000000000..c73fef975a93 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyProperties.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify properties of Streaming Policy + public partial class StreamingPolicyProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingPolicyProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingPolicyProperties(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_envelopeEncryption = If( json?.PropertyT("envelopeEncryption"), out var __jsonEnvelopeEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.EnvelopeEncryption.FromJson(__jsonEnvelopeEncryption) : EnvelopeEncryption;} + {_commonEncryptionCenc = If( json?.PropertyT("commonEncryptionCenc"), out var __jsonCommonEncryptionCenc) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CommonEncryptionCenc.FromJson(__jsonCommonEncryptionCenc) : CommonEncryptionCenc;} + {_commonEncryptionCbc = If( json?.PropertyT("commonEncryptionCbcs"), out var __jsonCommonEncryptionCbcs) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.CommonEncryptionCbcs.FromJson(__jsonCommonEncryptionCbcs) : CommonEncryptionCbc;} + {_noEncryption = If( json?.PropertyT("noEncryption"), out var __jsonNoEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.NoEncryption.FromJson(__jsonNoEncryption) : NoEncryption;} + {_created = If( json?.PropertyT("created"), out var __jsonCreated) ? global::System.DateTime.TryParse((string)__jsonCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedValue) ? __jsonCreatedValue : Created : Created;} + {_defaultContentKeyPolicyName = If( json?.PropertyT("defaultContentKeyPolicyName"), out var __jsonDefaultContentKeyPolicyName) ? (string)__jsonDefaultContentKeyPolicyName : (string)DefaultContentKeyPolicyName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._envelopeEncryption ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._envelopeEncryption.ToJson(null,serializationMode) : null, "envelopeEncryption" ,container.Add ); + AddIf( null != this._commonEncryptionCenc ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._commonEncryptionCenc.ToJson(null,serializationMode) : null, "commonEncryptionCenc" ,container.Add ); + AddIf( null != this._commonEncryptionCbc ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._commonEncryptionCbc.ToJson(null,serializationMode) : null, "commonEncryptionCbcs" ,container.Add ); + AddIf( null != this._noEncryption ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._noEncryption.ToJson(null,serializationMode) : null, "noEncryption" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._created ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._created?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "created" ,container.Add ); + } + AddIf( null != (((object)this._defaultContentKeyPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._defaultContentKeyPolicyName.ToString()) : null, "defaultContentKeyPolicyName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyWidevineConfiguration.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyWidevineConfiguration.cs new file mode 100644 index 000000000000..86816a6a7698 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyWidevineConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify configurations of Widevine in Streaming Policy + public partial class StreamingPolicyWidevineConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfigurationInternal + { + + /// Backing field for property. + private string _customLicenseAcquisitionUrlTemplate; + + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string CustomLicenseAcquisitionUrlTemplate { get => this._customLicenseAcquisitionUrlTemplate; set => this._customLicenseAcquisitionUrlTemplate = value; } + + /// Creates an new instance. + public StreamingPolicyWidevineConfiguration() + { + + } + } + /// Class to specify configurations of Widevine in Streaming Policy + public partial interface IStreamingPolicyWidevineConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.", + SerializedName = @"customLicenseAcquisitionUrlTemplate", + PossibleTypes = new [] { typeof(string) })] + string CustomLicenseAcquisitionUrlTemplate { get; set; } + + } + /// Class to specify configurations of Widevine in Streaming Policy + internal partial interface IStreamingPolicyWidevineConfigurationInternal + + { + /// + /// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the + /// value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the + /// value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. + /// + string CustomLicenseAcquisitionUrlTemplate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyWidevineConfiguration.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyWidevineConfiguration.json.cs new file mode 100644 index 000000000000..6876d25cf912 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/StreamingPolicyWidevineConfiguration.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify configurations of Widevine in Streaming Policy + public partial class StreamingPolicyWidevineConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IStreamingPolicyWidevineConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new StreamingPolicyWidevineConfiguration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal StreamingPolicyWidevineConfiguration(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_customLicenseAcquisitionUrlTemplate = If( json?.PropertyT("customLicenseAcquisitionUrlTemplate"), out var __jsonCustomLicenseAcquisitionUrlTemplate) ? (string)__jsonCustomLicenseAcquisitionUrlTemplate : (string)CustomLicenseAcquisitionUrlTemplate;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._customLicenseAcquisitionUrlTemplate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._customLicenseAcquisitionUrlTemplate.ToString()) : null, "customLicenseAcquisitionUrlTemplate" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/TextTrack.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/TextTrack.cs new file mode 100644 index 000000000000..abcd944b64c9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/TextTrack.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents a text track in an asset. A text track is usually used for sparse data related to the audio or video tracks. + /// + public partial class TextTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITextTrack, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITextTrackInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase __trackBase = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackBase(); + + /// Backing field for property. + private string _displayName; + + /// + /// The display name of the text track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _fileName; + + /// + /// The file name to the source file. This file is located in the storage container of the asset. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FileName { get => this._fileName; set => this._fileName = value; } + + /// The characteristics for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public string HlSettingCharacteristic { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Characteristic; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Characteristic = value ?? null; } + + /// The default for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? HlSettingDefault { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Default; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Default = value ?? default(bool); } + + /// The forced for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inlined)] + public bool? HlSettingForced { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Forced; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettingsInternal)HlsSetting).Forced = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings _hlsSetting; + + /// The HLS specific setting for the text track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings HlsSetting { get => (this._hlsSetting = this._hlsSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.HlsSettings()); set => this._hlsSetting = value; } + + /// Backing field for property. + private string _languageCode; + + /// The RFC5646 language code for the text track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string LanguageCode { get => this._languageCode; } + + /// Internal Acessors for HlsSetting + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITextTrackInternal.HlsSetting { get => (this._hlsSetting = this._hlsSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.HlsSettings()); set { {_hlsSetting = value;} } } + + /// Internal Acessors for LanguageCode + string Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITextTrackInternal.LanguageCode { get => this._languageCode; set { {_languageCode = value;} } } + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal)__trackBase).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal)__trackBase).OdataType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility? _playerVisibility; + + /// + /// 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". + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility? PlayerVisibility { get => this._playerVisibility; set => this._playerVisibility = value; } + + /// Creates an new instance. + public TextTrack() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackBase), __trackBase); + await eventListener.AssertObjectIsValid(nameof(__trackBase), __trackBase); + } + } + /// Represents a text track in an asset. A text track is usually used for sparse data related to the audio or video tracks. + public partial interface ITextTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase + { + /// + /// The display name of the text track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the text track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The file name to the source file. This file is located in the storage container of the asset. + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The file name to the source file. This file is located in the storage container of the asset.", + SerializedName = @"fileName", + PossibleTypes = new [] { typeof(string) })] + string FileName { get; set; } + /// The characteristics for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The characteristics for the HLS setting.", + SerializedName = @"characteristics", + PossibleTypes = new [] { typeof(string) })] + string HlSettingCharacteristic { get; set; } + /// The default for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default for the HLS setting.", + SerializedName = @"default", + PossibleTypes = new [] { typeof(bool) })] + bool? HlSettingDefault { get; set; } + /// The forced for the HLS setting. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The forced for the HLS setting.", + SerializedName = @"forced", + PossibleTypes = new [] { typeof(bool) })] + bool? HlSettingForced { get; set; } + /// The RFC5646 language code for the text track. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The RFC5646 language code for the text track.", + SerializedName = @"languageCode", + PossibleTypes = new [] { typeof(string) })] + string LanguageCode { get; } + /// + /// 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". + /// + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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"".", + SerializedName = @"playerVisibility", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility? PlayerVisibility { get; set; } + + } + /// Represents a text track in an asset. A text track is usually used for sparse data related to the audio or video tracks. + internal partial interface ITextTrackInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal + { + /// + /// The display name of the text track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA. + /// + string DisplayName { get; set; } + /// + /// The file name to the source file. This file is located in the storage container of the asset. + /// + string FileName { get; set; } + /// The characteristics for the HLS setting. + string HlSettingCharacteristic { get; set; } + /// The default for the HLS setting. + bool? HlSettingDefault { get; set; } + /// The forced for the HLS setting. + bool? HlSettingForced { get; set; } + /// The HLS specific setting for the text track. + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IHlsSettings HlsSetting { get; set; } + /// The RFC5646 language code for the text track. + string LanguageCode { get; set; } + /// + /// 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". + /// + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility? PlayerVisibility { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/TextTrack.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/TextTrack.json.cs new file mode 100644 index 000000000000..9f9810fa26ac --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/TextTrack.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Represents a text track in an asset. A text track is usually used for sparse data related to the audio or video tracks. + /// + public partial class TextTrack + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITextTrack. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITextTrack. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITextTrack FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TextTrack(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TextTrack(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackBase = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackBase(json); + {_hlsSetting = If( json?.PropertyT("hlsSettings"), out var __jsonHlsSettings) ? Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.HlsSettings.FromJson(__jsonHlsSettings) : HlsSetting;} + {_fileName = If( json?.PropertyT("fileName"), out var __jsonFileName) ? (string)__jsonFileName : (string)FileName;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_languageCode = If( json?.PropertyT("languageCode"), out var __jsonLanguageCode) ? (string)__jsonLanguageCode : (string)LanguageCode;} + {_playerVisibility = If( json?.PropertyT("playerVisibility"), out var __jsonPlayerVisibility) ? (string)__jsonPlayerVisibility : (string)PlayerVisibility;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackBase?.ToJson(container, serializationMode); + AddIf( null != this._hlsSetting ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) this._hlsSetting.ToJson(null,serializationMode) : null, "hlsSettings" ,container.Add ); + AddIf( null != (((object)this._fileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._fileName.ToString()) : null, "fileName" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._languageCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._languageCode.ToString()) : null, "languageCode" ,container.Add ); + } + AddIf( null != (((object)this._playerVisibility)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._playerVisibility.ToString()) : null, "playerVisibility" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackBase.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackBase.cs new file mode 100644 index 000000000000..96c2608762b0 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackBase.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base type for concrete track types. A derived type must be used to represent the Track. + /// + public partial class TrackBase : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal + { + + /// Backing field for property. + private string _odataType; + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OdataType { get => this._odataType; set => this._odataType = value; } + + /// Creates an new instance. + public TrackBase() + { + + } + } + /// Base type for concrete track types. A derived type must be used to represent the Track. + public partial interface ITrackBase : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The discriminator for derived types.", + SerializedName = @"@odata.type", + PossibleTypes = new [] { typeof(string) })] + string OdataType { get; set; } + + } + /// Base type for concrete track types. A derived type must be used to represent the Track. + internal partial interface ITrackBaseInternal + + { + /// The discriminator for derived types. + string OdataType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackBase.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackBase.json.cs new file mode 100644 index 000000000000..814f1dc4d14f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackBase.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// + /// Base type for concrete track types. A derived type must be used to represent the Track. + /// + public partial class TrackBase + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("@odata.type") ) + { + case "#Microsoft.Media.AudioTrack": + { + return new AudioTrack(json); + } + case "#Microsoft.Media.VideoTrack": + { + return new VideoTrack(json); + } + case "#Microsoft.Media.TextTrack": + { + return new TextTrack(json); + } + } + return new TrackBase(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._odataType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._odataType.ToString()) : null, "@odata.type" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TrackBase(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_odataType = If( json?.PropertyT("@odata.type"), out var __jsonOdataType) ? (string)__jsonOdataType : (string)OdataType;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackPropertyCondition.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackPropertyCondition.cs new file mode 100644 index 000000000000..bcd86cf5f6c6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackPropertyCondition.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify one track property condition + public partial class TrackPropertyCondition : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyConditionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation _operation; + + /// Track property condition operation + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation Operation { get => this._operation; set => this._operation = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType _property; + + /// Track property type + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType Property { get => this._property; set => this._property = value; } + + /// Backing field for property. + private string _value; + + /// Track property value + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public TrackPropertyCondition() + { + + } + } + /// Class to specify one track property condition + public partial interface ITrackPropertyCondition : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// Track property condition operation + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Track property condition operation", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation Operation { get; set; } + /// Track property type + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Track property type", + SerializedName = @"property", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType Property { get; set; } + /// Track property value + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Track property value", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// Class to specify one track property condition + internal partial interface ITrackPropertyConditionInternal + + { + /// Track property condition operation + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation Operation { get; set; } + /// Track property type + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType Property { get; set; } + /// Track property value + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackPropertyCondition.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackPropertyCondition.json.cs new file mode 100644 index 000000000000..ff0f50125549 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackPropertyCondition.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to specify one track property condition + public partial class TrackPropertyCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TrackPropertyCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._property)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._property.ToString()) : null, "property" ,container.Add ); + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TrackPropertyCondition(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("property"), out var __jsonProperty) ? (string)__jsonProperty : (string)Property;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackSelection.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackSelection.cs new file mode 100644 index 000000000000..2f6fd3db210a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackSelection.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to select a track + public partial class TrackSelection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelectionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition[] _trackSelections; + + /// TrackSelections is a track property condition list which can specify track(s) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition[] TrackSelections { get => this._trackSelections; set => this._trackSelections = value; } + + /// Creates an new instance. + public TrackSelection() + { + + } + } + /// Class to select a track + public partial interface ITrackSelection : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// TrackSelections is a track property condition list which can specify track(s) + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"TrackSelections is a track property condition list which can specify track(s)", + SerializedName = @"trackSelections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition) })] + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition[] TrackSelections { get; set; } + + } + /// Class to select a track + internal partial interface ITrackSelectionInternal + + { + /// TrackSelections is a track property condition list which can specify track(s) + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition[] TrackSelections { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackSelection.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackSelection.json.cs new file mode 100644 index 000000000000..24d678434c09 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/TrackSelection.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Class to select a track + public partial class TrackSelection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackSelection FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TrackSelection(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._trackSelections) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.XNodeArray(); + foreach( var __x in this._trackSelections ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("trackSelections",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TrackSelection(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_trackSelections = If( json?.PropertyT("trackSelections"), out var __jsonTrackSelections) ? If( __jsonTrackSelections as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackPropertyCondition) (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackPropertyCondition.FromJson(__u) )) ))() : null : TrackSelections;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/VideoTrack.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/VideoTrack.cs new file mode 100644 index 000000000000..6970962fbc03 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/VideoTrack.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents a video track in the asset. + public partial class VideoTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IVideoTrack, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IVideoTrackInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase __trackBase = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackBase(); + + /// The discriminator for derived types. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Inherited)] + public string OdataType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal)__trackBase).OdataType; set => ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal)__trackBase).OdataType = value ; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackBase), __trackBase); + await eventListener.AssertObjectIsValid(nameof(__trackBase), __trackBase); + } + + /// Creates an new instance. + public VideoTrack() + { + + } + } + /// Represents a video track in the asset. + public partial interface IVideoTrack : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBase + { + + } + /// Represents a video track in the asset. + internal partial interface IVideoTrackInternal : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.ITrackBaseInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/Api20220801/VideoTrack.json.cs b/swaggerci/mediaservices/generated/api/Models/Api20220801/VideoTrack.json.cs new file mode 100644 index 000000000000..1cc859147d51 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/Api20220801/VideoTrack.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + /// Represents a video track in the asset. + public partial class VideoTrack + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IVideoTrack. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IVideoTrack. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.IVideoTrack FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new VideoTrack(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackBase?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal VideoTrack(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackBase = new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.Api20220801.TrackBase(json); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/MediaServicesIdentity.cs b/swaggerci/mediaservices/generated/api/Models/MediaServicesIdentity.cs new file mode 100644 index 000000000000..cd81df8353e3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/MediaServicesIdentity.cs @@ -0,0 +1,336 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class MediaServicesIdentity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesIdentity, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesIdentityInternal + { + + /// Backing field for property. + private string _accountName; + + /// The Media Services account name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AccountName { get => this._accountName; set => this._accountName = value; } + + /// Backing field for property. + private string _assetName; + + /// The Asset name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AssetName { get => this._assetName; set => this._assetName = value; } + + /// Backing field for property. + private string _contentKeyPolicyName; + + /// The Content Key Policy name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ContentKeyPolicyName { get => this._contentKeyPolicyName; set => this._contentKeyPolicyName = value; } + + /// Backing field for property. + private string _filterName; + + /// The Account Filter name + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string FilterName { get => this._filterName; set => this._filterName = value; } + + /// Backing field for property. + private string _id; + + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _jobName; + + /// The Job name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _liveEventName; + + /// The name of the live event, maximum length is 32. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string LiveEventName { get => this._liveEventName; set => this._liveEventName = value; } + + /// Backing field for property. + private string _liveOutputName; + + /// The name of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string LiveOutputName { get => this._liveOutputName; set => this._liveOutputName = value; } + + /// Backing field for property. + private string _locationName; + + /// Location name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string LocationName { get => this._locationName; set => this._locationName = value; } + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _operationId; + + /// Operation ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string OperationId { get => this._operationId; set => this._operationId = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group within the Azure subscription. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _streamingEndpointName; + + /// The name of the streaming endpoint, maximum length is 24. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string StreamingEndpointName { get => this._streamingEndpointName; set => this._streamingEndpointName = value; } + + /// Backing field for property. + private string _streamingLocatorName; + + /// The Streaming Locator name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string StreamingLocatorName { get => this._streamingLocatorName; set => this._streamingLocatorName = value; } + + /// Backing field for property. + private string _streamingPolicyName; + + /// The Streaming Policy name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string StreamingPolicyName { get => this._streamingPolicyName; set => this._streamingPolicyName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The unique identifier for a Microsoft Azure subscription. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _trackName; + + /// The Asset Track name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string TrackName { get => this._trackName; set => this._trackName = value; } + + /// Backing field for property. + private string _transformName; + + /// The Transform name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string TransformName { get => this._transformName; set => this._transformName = value; } + + /// Creates an new instance. + public MediaServicesIdentity() + { + + } + } + public partial interface IMediaServicesIdentity : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable + { + /// The Media Services account name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Media Services account name.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + string AccountName { get; set; } + /// The Asset name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Asset name.", + SerializedName = @"assetName", + PossibleTypes = new [] { typeof(string) })] + string AssetName { get; set; } + /// The Content Key Policy name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Content Key Policy name.", + SerializedName = @"contentKeyPolicyName", + PossibleTypes = new [] { typeof(string) })] + string ContentKeyPolicyName { get; set; } + /// The Account Filter name + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Account Filter name", + SerializedName = @"filterName", + PossibleTypes = new [] { typeof(string) })] + string FilterName { get; set; } + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource identity path", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// The Job name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Job name.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + string JobName { get; set; } + /// The name of the live event, maximum length is 32. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the live event, maximum length is 32.", + SerializedName = @"liveEventName", + PossibleTypes = new [] { typeof(string) })] + string LiveEventName { get; set; } + /// The name of the live output. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the live output.", + SerializedName = @"liveOutputName", + PossibleTypes = new [] { typeof(string) })] + string LiveOutputName { get; set; } + /// Location name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Location name.", + SerializedName = @"locationName", + PossibleTypes = new [] { typeof(string) })] + string LocationName { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Operation ID. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation ID.", + SerializedName = @"operationId", + PossibleTypes = new [] { typeof(string) })] + string OperationId { get; set; } + /// The name of the resource group within the Azure subscription. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroupName { get; set; } + /// The name of the streaming endpoint, maximum length is 24. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the streaming endpoint, maximum length is 24.", + SerializedName = @"streamingEndpointName", + PossibleTypes = new [] { typeof(string) })] + string StreamingEndpointName { get; set; } + /// The Streaming Locator name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Streaming Locator name.", + SerializedName = @"streamingLocatorName", + PossibleTypes = new [] { typeof(string) })] + string StreamingLocatorName { get; set; } + /// The Streaming Policy name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Streaming Policy name.", + SerializedName = @"streamingPolicyName", + PossibleTypes = new [] { typeof(string) })] + string StreamingPolicyName { get; set; } + /// The unique identifier for a Microsoft Azure subscription. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The unique identifier for a Microsoft Azure subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + /// The Asset Track name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Asset Track name.", + SerializedName = @"trackName", + PossibleTypes = new [] { typeof(string) })] + string TrackName { get; set; } + /// The Transform name. + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Transform name.", + SerializedName = @"transformName", + PossibleTypes = new [] { typeof(string) })] + string TransformName { get; set; } + + } + internal partial interface IMediaServicesIdentityInternal + + { + /// The Media Services account name. + string AccountName { get; set; } + /// The Asset name. + string AssetName { get; set; } + /// The Content Key Policy name. + string ContentKeyPolicyName { get; set; } + /// The Account Filter name + string FilterName { get; set; } + /// Resource identity path + string Id { get; set; } + /// The Job name. + string JobName { get; set; } + /// The name of the live event, maximum length is 32. + string LiveEventName { get; set; } + /// The name of the live output. + string LiveOutputName { get; set; } + /// Location name. + string LocationName { get; set; } + + string Name { get; set; } + /// Operation ID. + string OperationId { get; set; } + /// The name of the resource group within the Azure subscription. + string ResourceGroupName { get; set; } + /// The name of the streaming endpoint, maximum length is 24. + string StreamingEndpointName { get; set; } + /// The Streaming Locator name. + string StreamingLocatorName { get; set; } + /// The Streaming Policy name. + string StreamingPolicyName { get; set; } + /// The unique identifier for a Microsoft Azure subscription. + string SubscriptionId { get; set; } + /// The Asset Track name. + string TrackName { get; set; } + /// The Transform name. + string TransformName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/MediaServicesIdentity.json.cs b/swaggerci/mediaservices/generated/api/Models/MediaServicesIdentity.json.cs new file mode 100644 index 000000000000..fe98c6ea6534 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/MediaServicesIdentity.json.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class MediaServicesIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaServicesIdentity(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MediaServicesIdentity(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} + {_accountName = If( json?.PropertyT("accountName"), out var __jsonAccountName) ? (string)__jsonAccountName : (string)AccountName;} + {_filterName = If( json?.PropertyT("filterName"), out var __jsonFilterName) ? (string)__jsonFilterName : (string)FilterName;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_locationName = If( json?.PropertyT("locationName"), out var __jsonLocationName) ? (string)__jsonLocationName : (string)LocationName;} + {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)OperationId;} + {_assetName = If( json?.PropertyT("assetName"), out var __jsonAssetName) ? (string)__jsonAssetName : (string)AssetName;} + {_trackName = If( json?.PropertyT("trackName"), out var __jsonTrackName) ? (string)__jsonTrackName : (string)TrackName;} + {_contentKeyPolicyName = If( json?.PropertyT("contentKeyPolicyName"), out var __jsonContentKeyPolicyName) ? (string)__jsonContentKeyPolicyName : (string)ContentKeyPolicyName;} + {_transformName = If( json?.PropertyT("transformName"), out var __jsonTransformName) ? (string)__jsonTransformName : (string)TransformName;} + {_jobName = If( json?.PropertyT("jobName"), out var __jsonJobName) ? (string)__jsonJobName : (string)JobName;} + {_streamingPolicyName = If( json?.PropertyT("streamingPolicyName"), out var __jsonStreamingPolicyName) ? (string)__jsonStreamingPolicyName : (string)StreamingPolicyName;} + {_streamingLocatorName = If( json?.PropertyT("streamingLocatorName"), out var __jsonStreamingLocatorName) ? (string)__jsonStreamingLocatorName : (string)StreamingLocatorName;} + {_liveEventName = If( json?.PropertyT("liveEventName"), out var __jsonLiveEventName) ? (string)__jsonLiveEventName : (string)LiveEventName;} + {_liveOutputName = If( json?.PropertyT("liveOutputName"), out var __jsonLiveOutputName) ? (string)__jsonLiveOutputName : (string)LiveOutputName;} + {_streamingEndpointName = If( json?.PropertyT("streamingEndpointName"), out var __jsonStreamingEndpointName) ? (string)__jsonStreamingEndpointName : (string)StreamingEndpointName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); + AddIf( null != (((object)this._accountName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._accountName.ToString()) : null, "accountName" ,container.Add ); + AddIf( null != (((object)this._filterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._filterName.ToString()) : null, "filterName" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._locationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._locationName.ToString()) : null, "locationName" ,container.Add ); + AddIf( null != (((object)this._operationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._operationId.ToString()) : null, "operationId" ,container.Add ); + AddIf( null != (((object)this._assetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._assetName.ToString()) : null, "assetName" ,container.Add ); + AddIf( null != (((object)this._trackName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._trackName.ToString()) : null, "trackName" ,container.Add ); + AddIf( null != (((object)this._contentKeyPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._contentKeyPolicyName.ToString()) : null, "contentKeyPolicyName" ,container.Add ); + AddIf( null != (((object)this._transformName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._transformName.ToString()) : null, "transformName" ,container.Add ); + AddIf( null != (((object)this._jobName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._jobName.ToString()) : null, "jobName" ,container.Add ); + AddIf( null != (((object)this._streamingPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingPolicyName.ToString()) : null, "streamingPolicyName" ,container.Add ); + AddIf( null != (((object)this._streamingLocatorName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingLocatorName.ToString()) : null, "streamingLocatorName" ,container.Add ); + AddIf( null != (((object)this._liveEventName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._liveEventName.ToString()) : null, "liveEventName" ,container.Add ); + AddIf( null != (((object)this._liveOutputName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._liveOutputName.ToString()) : null, "liveOutputName" ,container.Add ); + AddIf( null != (((object)this._streamingEndpointName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._streamingEndpointName.ToString()) : null, "streamingEndpointName" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/MediaServicesOperationResultsGetAcceptedResponseHeaders.cs b/swaggerci/mediaservices/generated/api/Models/MediaServicesOperationResultsGetAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..07bf31e1c581 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/MediaServicesOperationResultsGetAcceptedResponseHeaders.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class MediaServicesOperationResultsGetAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesOperationResultsGetAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesOperationResultsGetAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public MediaServicesOperationResultsGetAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesOperationResultsGetAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); + } + if (headers.TryGetValues("Location", out var __locationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesOperationResultsGetAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader1) is string __headerLocationHeader1 ? __headerLocationHeader1 : (string)null; + } + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader2)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesOperationResultsGetAcceptedResponseHeadersInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader2) is string __headerAzureAsyncOperationHeader2 ? __headerAzureAsyncOperationHeader2 : (string)null; + } + } + } + public partial interface IMediaServicesOperationResultsGetAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IMediaServicesOperationResultsGetAcceptedResponseHeadersInternal + + { + string AzureAsyncOperation { get; set; } + + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/MediaServicesOperationResultsGetAcceptedResponseHeaders.json.cs b/swaggerci/mediaservices/generated/api/Models/MediaServicesOperationResultsGetAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..377ab734261a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/MediaServicesOperationResultsGetAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class MediaServicesOperationResultsGetAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesOperationResultsGetAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesOperationResultsGetAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IMediaServicesOperationResultsGetAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new MediaServicesOperationResultsGetAcceptedResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal MediaServicesOperationResultsGetAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/OperationResultsGetAcceptedResponseHeaders.cs b/swaggerci/mediaservices/generated/api/Models/OperationResultsGetAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..87c917910530 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/OperationResultsGetAcceptedResponseHeaders.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class OperationResultsGetAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IOperationResultsGetAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IOperationResultsGetAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IOperationResultsGetAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); + } + if (headers.TryGetValues("Location", out var __locationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IOperationResultsGetAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader1) is string __headerLocationHeader1 ? __headerLocationHeader1 : (string)null; + } + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader2)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IOperationResultsGetAcceptedResponseHeadersInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader2) is string __headerAzureAsyncOperationHeader2 ? __headerAzureAsyncOperationHeader2 : (string)null; + } + } + + /// + /// Creates an new instance. + /// + public OperationResultsGetAcceptedResponseHeaders() + { + + } + } + public partial interface IOperationResultsGetAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IOperationResultsGetAcceptedResponseHeadersInternal + + { + string AzureAsyncOperation { get; set; } + + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/OperationResultsGetAcceptedResponseHeaders.json.cs b/swaggerci/mediaservices/generated/api/Models/OperationResultsGetAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..67a47664a2ef --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/OperationResultsGetAcceptedResponseHeaders.json.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class OperationResultsGetAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IOperationResultsGetAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IOperationResultsGetAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.IOperationResultsGetAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new OperationResultsGetAcceptedResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal OperationResultsGetAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/TracksDeleteAcceptedResponseHeaders.cs b/swaggerci/mediaservices/generated/api/Models/TracksDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..4caf1b4f9635 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/TracksDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class TracksDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); + } + if (headers.TryGetValues("Location", out var __locationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader1) is string __headerLocationHeader1 ? __headerLocationHeader1 : (string)null; + } + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader2)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksDeleteAcceptedResponseHeadersInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader2) is string __headerAzureAsyncOperationHeader2 ? __headerAzureAsyncOperationHeader2 : (string)null; + } + } + + /// Creates an new instance. + public TracksDeleteAcceptedResponseHeaders() + { + + } + } + public partial interface ITracksDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface ITracksDeleteAcceptedResponseHeadersInternal + + { + string AzureAsyncOperation { get; set; } + + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/TracksDeleteAcceptedResponseHeaders.json.cs b/swaggerci/mediaservices/generated/api/Models/TracksDeleteAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..835993ba5eb4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/TracksDeleteAcceptedResponseHeaders.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class TracksDeleteAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksDeleteAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksDeleteAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TracksDeleteAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TracksDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/TracksUpdateTrackDataAcceptedResponseHeaders.cs b/swaggerci/mediaservices/generated/api/Models/TracksUpdateTrackDataAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..36a64da31186 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/TracksUpdateTrackDataAcceptedResponseHeaders.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class TracksUpdateTrackDataAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksUpdateTrackDataAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksUpdateTrackDataAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksUpdateTrackDataAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); + } + if (headers.TryGetValues("Location", out var __locationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksUpdateTrackDataAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader1) is string __headerLocationHeader1 ? __headerLocationHeader1 : (string)null; + } + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader2)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksUpdateTrackDataAcceptedResponseHeadersInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader2) is string __headerAzureAsyncOperationHeader2 ? __headerAzureAsyncOperationHeader2 : (string)null; + } + } + + /// + /// Creates an new instance. + /// + public TracksUpdateTrackDataAcceptedResponseHeaders() + { + + } + } + public partial interface ITracksUpdateTrackDataAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface ITracksUpdateTrackDataAcceptedResponseHeadersInternal + + { + string AzureAsyncOperation { get; set; } + + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Models/TracksUpdateTrackDataAcceptedResponseHeaders.json.cs b/swaggerci/mediaservices/generated/api/Models/TracksUpdateTrackDataAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..fc9945823ff8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Models/TracksUpdateTrackDataAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public partial class TracksUpdateTrackDataAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksUpdateTrackDataAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksUpdateTrackDataAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Models.ITracksUpdateTrackDataAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json ? new TracksUpdateTrackDataAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject instance to deserialize from. + internal TracksUpdateTrackDataAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/AacAudioProfile.cs b/swaggerci/mediaservices/generated/api/Support/AacAudioProfile.cs new file mode 100644 index 000000000000..852bac9cf505 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/AacAudioProfile.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The encoding profile to be used when encoding audio with AAC. + public partial struct AacAudioProfile : + System.IEquatable + { + /// + /// Specifies that the output audio is to be encoded into AAC Low Complexity profile (AAC-LC). + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile AacLc = @"AacLc"; + + /// Specifies that the output audio is to be encoded into HE-AAC v1 profile. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile HeAacV1 = @"HeAacV1"; + + /// Specifies that the output audio is to be encoded into HE-AAC v2 profile. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile HeAacV2 = @"HeAacV2"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AacAudioProfile(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AacAudioProfile + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AacAudioProfile(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AacAudioProfile + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AacAudioProfile (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AacAudioProfile && Equals((AacAudioProfile)obj); + } + + /// Returns hashCode for enum AacAudioProfile + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AacAudioProfile + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AacAudioProfile + /// the value to convert to an instance of . + + public static implicit operator AacAudioProfile(string value) + { + return new AacAudioProfile(value); + } + + /// Implicit operator to convert AacAudioProfile to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile e) + { + return e._value; + } + + /// Overriding != operator for enum AacAudioProfile + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AacAudioProfile + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AacAudioProfile e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/AccountEncryptionKeyType.cs b/swaggerci/mediaservices/generated/api/Support/AccountEncryptionKeyType.cs new file mode 100644 index 000000000000..3ba1e9f88f2f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/AccountEncryptionKeyType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The type of key used to encrypt the Account Key. + public partial struct AccountEncryptionKeyType : + System.IEquatable + { + /// The Account Key is encrypted with a Customer Key. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType CustomerKey = @"CustomerKey"; + + /// The Account Key is encrypted with a System Key. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType SystemKey = @"SystemKey"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AccountEncryptionKeyType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AccountEncryptionKeyType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AccountEncryptionKeyType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AccountEncryptionKeyType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AccountEncryptionKeyType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AccountEncryptionKeyType && Equals((AccountEncryptionKeyType)obj); + } + + /// Returns hashCode for enum AccountEncryptionKeyType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AccountEncryptionKeyType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AccountEncryptionKeyType + /// the value to convert to an instance of . + + public static implicit operator AccountEncryptionKeyType(string value) + { + return new AccountEncryptionKeyType(value); + } + + /// Implicit operator to convert AccountEncryptionKeyType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType e) + { + return e._value; + } + + /// Overriding != operator for enum AccountEncryptionKeyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AccountEncryptionKeyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AccountEncryptionKeyType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/ActionType.cs b/swaggerci/mediaservices/generated/api/Support/ActionType.cs new file mode 100644 index 000000000000..22108391d346 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/ActionType.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Indicates the action type. + public partial struct ActionType : + System.IEquatable + { + /// An internal action. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType Internal = @"Internal"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ActionType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ActionType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ActionType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ActionType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ActionType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ActionType && Equals((ActionType)obj); + } + + /// Returns hashCode for enum ActionType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ActionType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ActionType + /// the value to convert to an instance of . + + public static implicit operator ActionType(string value) + { + return new ActionType(value); + } + + /// Implicit operator to convert ActionType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType e) + { + return e._value; + } + + /// Overriding != operator for enum ActionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ActionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ActionType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/AnalysisResolution.cs b/swaggerci/mediaservices/generated/api/Support/AnalysisResolution.cs new file mode 100644 index 000000000000..65ed045caf90 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/AnalysisResolution.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will + /// keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to + /// standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. + /// For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce + /// the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics + /// for details). However, faces that end up being too small in the resized video may not be detected. + /// + public partial struct AnalysisResolution : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution SourceResolution = @"SourceResolution"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution StandardDefinition = @"StandardDefinition"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AnalysisResolution(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AnalysisResolution + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AnalysisResolution(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AnalysisResolution + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AnalysisResolution (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AnalysisResolution && Equals((AnalysisResolution)obj); + } + + /// Returns hashCode for enum AnalysisResolution + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AnalysisResolution + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AnalysisResolution + /// the value to convert to an instance of . + + public static implicit operator AnalysisResolution(string value) + { + return new AnalysisResolution(value); + } + + /// Implicit operator to convert AnalysisResolution to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution e) + { + return e._value; + } + + /// Overriding != operator for enum AnalysisResolution + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AnalysisResolution + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AnalysisResolution e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/AssetContainerPermission.cs b/swaggerci/mediaservices/generated/api/Support/AssetContainerPermission.cs new file mode 100644 index 000000000000..d803b3c986c1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/AssetContainerPermission.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The permissions to set on the SAS URL. + public partial struct AssetContainerPermission : + System.IEquatable + { + /// The SAS URL will allow read access to the container. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission Read = @"Read"; + + /// The SAS URL will allow read and write access to the container. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission ReadWrite = @"ReadWrite"; + + /// The SAS URL will allow read, write and delete access to the container. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission ReadWriteDelete = @"ReadWriteDelete"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AssetContainerPermission(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AssetContainerPermission + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AssetContainerPermission(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AssetContainerPermission + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AssetContainerPermission (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AssetContainerPermission && Equals((AssetContainerPermission)obj); + } + + /// Returns hashCode for enum AssetContainerPermission + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AssetContainerPermission + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AssetContainerPermission + /// the value to convert to an instance of . + + public static implicit operator AssetContainerPermission(string value) + { + return new AssetContainerPermission(value); + } + + /// Implicit operator to convert AssetContainerPermission to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission e) + { + return e._value; + } + + /// Overriding != operator for enum AssetContainerPermission + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AssetContainerPermission + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetContainerPermission e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/AssetStorageEncryptionFormat.cs b/swaggerci/mediaservices/generated/api/Support/AssetStorageEncryptionFormat.cs new file mode 100644 index 000000000000..e00660d3bde8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/AssetStorageEncryptionFormat.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The Asset encryption format. One of None or MediaStorageEncryption. + public partial struct AssetStorageEncryptionFormat : + System.IEquatable + { + /// The Asset is encrypted with Media Services client-side encryption. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat MediaStorageClientEncryption = @"MediaStorageClientEncryption"; + + /// + /// The Asset does not use client-side storage encryption (this is the only allowed value for new Assets). + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat None = @"None"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AssetStorageEncryptionFormat(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AssetStorageEncryptionFormat + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AssetStorageEncryptionFormat(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AssetStorageEncryptionFormat + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AssetStorageEncryptionFormat (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AssetStorageEncryptionFormat && Equals((AssetStorageEncryptionFormat)obj); + } + + /// Returns hashCode for enum AssetStorageEncryptionFormat + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AssetStorageEncryptionFormat + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AssetStorageEncryptionFormat + /// the value to convert to an instance of . + + public static implicit operator AssetStorageEncryptionFormat(string value) + { + return new AssetStorageEncryptionFormat(value); + } + + /// Implicit operator to convert AssetStorageEncryptionFormat to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat e) + { + return e._value; + } + + /// Overriding != operator for enum AssetStorageEncryptionFormat + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AssetStorageEncryptionFormat + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AssetStorageEncryptionFormat e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/AsyncOperationStatus.cs b/swaggerci/mediaservices/generated/api/Support/AsyncOperationStatus.cs new file mode 100644 index 000000000000..4aaf0832da18 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/AsyncOperationStatus.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Operation status of the async operation. + public partial struct AsyncOperationStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus InProgress = @"InProgress"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus Succeeded = @"Succeeded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AsyncOperationStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AsyncOperationStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AsyncOperationStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AsyncOperationStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AsyncOperationStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AsyncOperationStatus && Equals((AsyncOperationStatus)obj); + } + + /// Returns hashCode for enum AsyncOperationStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AsyncOperationStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AsyncOperationStatus + /// the value to convert to an instance of . + + public static implicit operator AsyncOperationStatus(string value) + { + return new AsyncOperationStatus(value); + } + + /// Implicit operator to convert AsyncOperationStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus e) + { + return e._value; + } + + /// Overriding != operator for enum AsyncOperationStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AsyncOperationStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AsyncOperationStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/AttributeFilter.cs b/swaggerci/mediaservices/generated/api/Support/AttributeFilter.cs new file mode 100644 index 000000000000..8bd0b8e8e3e7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/AttributeFilter.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks. + /// + public partial struct AttributeFilter : + System.IEquatable + { + /// All tracks will be included. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter All = @"All"; + + /// + /// The first track will be included when the attribute is sorted in ascending order. Generally used to select the smallest + /// bitrate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter Bottom = @"Bottom"; + + /// + /// The first track will be included when the attribute is sorted in descending order. Generally used to select the largest + /// bitrate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter Top = @"Top"; + + /// Any tracks that have an attribute equal to the value given will be included. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter ValueEquals = @"ValueEquals"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AttributeFilter(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AttributeFilter + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AttributeFilter(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AttributeFilter + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AttributeFilter (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AttributeFilter && Equals((AttributeFilter)obj); + } + + /// Returns hashCode for enum AttributeFilter + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AttributeFilter + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AttributeFilter + /// the value to convert to an instance of . + + public static implicit operator AttributeFilter(string value) + { + return new AttributeFilter(value); + } + + /// Implicit operator to convert AttributeFilter to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter e) + { + return e._value; + } + + /// Overriding != operator for enum AttributeFilter + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AttributeFilter + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AttributeFilter e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/AudioAnalysisMode.cs b/swaggerci/mediaservices/generated/api/Support/AudioAnalysisMode.cs new file mode 100644 index 000000000000..71434822c7bd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/AudioAnalysisMode.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would + /// be chosen. + /// + public partial struct AudioAnalysisMode : + System.IEquatable + { + /// + /// This mode performs speech-to-text transcription and generation of a VTT subtitle/caption file. The output of this mode + /// includes an Insights JSON file including only the keywords, transcription,and timing information. Automatic language detection + /// and speaker diarization are not included in this mode. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode Basic = @"Basic"; + + /// + /// Performs all operations included in the Basic mode, additionally performing language detection and speaker diarization. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode Standard = @"Standard"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AudioAnalysisMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AudioAnalysisMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AudioAnalysisMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AudioAnalysisMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AudioAnalysisMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AudioAnalysisMode && Equals((AudioAnalysisMode)obj); + } + + /// Returns hashCode for enum AudioAnalysisMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AudioAnalysisMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AudioAnalysisMode + /// the value to convert to an instance of . + + public static implicit operator AudioAnalysisMode(string value) + { + return new AudioAnalysisMode(value); + } + + /// Implicit operator to convert AudioAnalysisMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode e) + { + return e._value; + } + + /// Overriding != operator for enum AudioAnalysisMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AudioAnalysisMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.AudioAnalysisMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/BlurType.cs b/swaggerci/mediaservices/generated/api/Support/BlurType.cs new file mode 100644 index 000000000000..8f0a1819c033 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/BlurType.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Blur type + public partial struct BlurType : + System.IEquatable + { + /// Black: Black out filter + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType Black = @"Black"; + + /// Box: debug filter, bounding box only + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType Box = @"Box"; + + /// High: Confuse blur filter + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType High = @"High"; + + /// Low: box-car blur filter + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType Low = @"Low"; + + /// Med: Gaussian blur filter + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType Med = @"Med"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private BlurType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to BlurType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new BlurType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type BlurType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type BlurType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is BlurType && Equals((BlurType)obj); + } + + /// Returns hashCode for enum BlurType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for BlurType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to BlurType + /// the value to convert to an instance of . + + public static implicit operator BlurType(string value) + { + return new BlurType(value); + } + + /// Implicit operator to convert BlurType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType e) + { + return e._value; + } + + /// Overriding != operator for enum BlurType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum BlurType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.BlurType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/ChannelMapping.cs b/swaggerci/mediaservices/generated/api/Support/ChannelMapping.cs new file mode 100644 index 000000000000..acdd9357308e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/ChannelMapping.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio + /// tracks. + /// + public partial struct ChannelMapping : + System.IEquatable + { + /// The Back Left Channel. Sometimes referred to as the Left Surround Channel. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping BackLeft = @"BackLeft"; + + /// The Back Right Channel. Sometimes referred to as the Right Surround Channel. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping BackRight = @"BackRight"; + + /// The Center Channel. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping Center = @"Center"; + + /// The Front Left Channel. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping FrontLeft = @"FrontLeft"; + + /// The Front Right Channel. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping FrontRight = @"FrontRight"; + + /// Low Frequency Effects Channel. Sometimes referred to as the Subwoofer. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping LowFrequencyEffects = @"LowFrequencyEffects"; + + /// The Left Stereo channel. Sometimes referred to as Down Mix Left. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping StereoLeft = @"StereoLeft"; + + /// The Right Stereo channel. Sometimes referred to as Down Mix Right. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping StereoRight = @"StereoRight"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ChannelMapping(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ChannelMapping + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ChannelMapping(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ChannelMapping + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ChannelMapping (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ChannelMapping && Equals((ChannelMapping)obj); + } + + /// Returns hashCode for enum ChannelMapping + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ChannelMapping + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ChannelMapping + /// the value to convert to an instance of . + + public static implicit operator ChannelMapping(string value) + { + return new ChannelMapping(value); + } + + /// Implicit operator to convert ChannelMapping to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping e) + { + return e._value; + } + + /// Overriding != operator for enum ChannelMapping + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ChannelMapping + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ChannelMapping e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/Complexity.cs b/swaggerci/mediaservices/generated/api/Support/Complexity.cs new file mode 100644 index 000000000000..bcf82d739f7c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/Complexity.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity + /// as Speed for faster encoding but less compression efficiency. + /// + public partial struct Complexity : + System.IEquatable + { + /// + /// Configures the encoder to use settings that achieve a balance between speed and quality. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity Balanced = @"Balanced"; + + /// + /// Configures the encoder to use settings optimized to produce higher quality output at the expense of slower overall encode + /// time. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity Quality = @"Quality"; + + /// + /// Configures the encoder to use settings optimized for faster encoding. Quality is sacrificed to decrease encoding time. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity Speed = @"Speed"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Complexity(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to Complexity + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Complexity(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Complexity + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Complexity (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Complexity && Equals((Complexity)obj); + } + + /// Returns hashCode for enum Complexity + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for Complexity + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Complexity + /// the value to convert to an instance of . + + public static implicit operator Complexity(string value) + { + return new Complexity(value); + } + + /// Implicit operator to convert Complexity to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity e) + { + return e._value; + } + + /// Overriding != operator for enum Complexity + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Complexity + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Complexity e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyFairPlayRentalAndLeaseKeyType.cs b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyFairPlayRentalAndLeaseKeyType.cs new file mode 100644 index 000000000000..69473d789da3 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyFairPlayRentalAndLeaseKeyType.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The rental and lease key type. + public partial struct ContentKeyPolicyFairPlayRentalAndLeaseKeyType : + System.IEquatable + { + /// Dual expiry for offline rental. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType DualExpiry = @"DualExpiry"; + + /// + /// Content key can be persisted and the valid duration is limited by the Rental Duration value + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType PersistentLimited = @"PersistentLimited"; + + /// Content key can be persisted with an unlimited duration + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType PersistentUnlimited = @"PersistentUnlimited"; + + /// Key duration is not specified. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType Undefined = @"Undefined"; + + /// + /// Represents a ContentKeyPolicyFairPlayRentalAndLeaseKeyType that is unavailable in current API version. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType Unknown = @"Unknown"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ContentKeyPolicyFairPlayRentalAndLeaseKeyType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// + /// Conversion from arbitrary object to ContentKeyPolicyFairPlayRentalAndLeaseKeyType + /// + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ContentKeyPolicyFairPlayRentalAndLeaseKeyType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ContentKeyPolicyFairPlayRentalAndLeaseKeyType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type ContentKeyPolicyFairPlayRentalAndLeaseKeyType (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ContentKeyPolicyFairPlayRentalAndLeaseKeyType && Equals((ContentKeyPolicyFairPlayRentalAndLeaseKeyType)obj); + } + + /// Returns hashCode for enum ContentKeyPolicyFairPlayRentalAndLeaseKeyType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ContentKeyPolicyFairPlayRentalAndLeaseKeyType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// + /// Implicit operator to convert string to ContentKeyPolicyFairPlayRentalAndLeaseKeyType + /// + /// the value to convert to an instance of . + + public static implicit operator ContentKeyPolicyFairPlayRentalAndLeaseKeyType(string value) + { + return new ContentKeyPolicyFairPlayRentalAndLeaseKeyType(value); + } + + /// + /// Implicit operator to convert ContentKeyPolicyFairPlayRentalAndLeaseKeyType to string + /// + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType e) + { + return e._value; + } + + /// Overriding != operator for enum ContentKeyPolicyFairPlayRentalAndLeaseKeyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ContentKeyPolicyFairPlayRentalAndLeaseKeyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyFairPlayRentalAndLeaseKeyType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyContentType.cs b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyContentType.cs new file mode 100644 index 000000000000..e7fdcee8e999 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyContentType.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The PlayReady content type. + public partial struct ContentKeyPolicyPlayReadyContentType : + System.IEquatable + { + /// Ultraviolet download content type. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType UltraVioletDownload = @"UltraVioletDownload"; + + /// Ultraviolet streaming content type. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType UltraVioletStreaming = @"UltraVioletStreaming"; + + /// + /// Represents a ContentKeyPolicyPlayReadyContentType that is unavailable in current API version. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType Unknown = @"Unknown"; + + /// Unspecified content type. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType Unspecified = @"Unspecified"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ContentKeyPolicyPlayReadyContentType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ContentKeyPolicyPlayReadyContentType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ContentKeyPolicyPlayReadyContentType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ContentKeyPolicyPlayReadyContentType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type ContentKeyPolicyPlayReadyContentType (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ContentKeyPolicyPlayReadyContentType && Equals((ContentKeyPolicyPlayReadyContentType)obj); + } + + /// Returns hashCode for enum ContentKeyPolicyPlayReadyContentType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ContentKeyPolicyPlayReadyContentType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ContentKeyPolicyPlayReadyContentType + /// the value to convert to an instance of . + + public static implicit operator ContentKeyPolicyPlayReadyContentType(string value) + { + return new ContentKeyPolicyPlayReadyContentType(value); + } + + /// Implicit operator to convert ContentKeyPolicyPlayReadyContentType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType e) + { + return e._value; + } + + /// Overriding != operator for enum ContentKeyPolicyPlayReadyContentType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ContentKeyPolicyPlayReadyContentType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyContentType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyLicenseType.cs b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyLicenseType.cs new file mode 100644 index 000000000000..e6e49b87c290 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyLicenseType.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The license type. + public partial struct ContentKeyPolicyPlayReadyLicenseType : + System.IEquatable + { + /// Non persistent license. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType NonPersistent = @"NonPersistent"; + + /// Persistent license. Allows offline playback. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType Persistent = @"Persistent"; + + /// + /// Represents a ContentKeyPolicyPlayReadyLicenseType that is unavailable in current API version. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType Unknown = @"Unknown"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ContentKeyPolicyPlayReadyLicenseType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ContentKeyPolicyPlayReadyLicenseType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ContentKeyPolicyPlayReadyLicenseType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ContentKeyPolicyPlayReadyLicenseType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type ContentKeyPolicyPlayReadyLicenseType (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ContentKeyPolicyPlayReadyLicenseType && Equals((ContentKeyPolicyPlayReadyLicenseType)obj); + } + + /// Returns hashCode for enum ContentKeyPolicyPlayReadyLicenseType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ContentKeyPolicyPlayReadyLicenseType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ContentKeyPolicyPlayReadyLicenseType + /// the value to convert to an instance of . + + public static implicit operator ContentKeyPolicyPlayReadyLicenseType(string value) + { + return new ContentKeyPolicyPlayReadyLicenseType(value); + } + + /// Implicit operator to convert ContentKeyPolicyPlayReadyLicenseType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType e) + { + return e._value; + } + + /// Overriding != operator for enum ContentKeyPolicyPlayReadyLicenseType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ContentKeyPolicyPlayReadyLicenseType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyLicenseType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyUnknownOutputPassingOption.cs b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyUnknownOutputPassingOption.cs new file mode 100644 index 000000000000..0593a47fa546 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyPlayReadyUnknownOutputPassingOption.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Configures Unknown output handling settings of the license. + public partial struct ContentKeyPolicyPlayReadyUnknownOutputPassingOption : + System.IEquatable + { + /// Passing the video portion of protected content to an Unknown Output is allowed. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption Allowed = @"Allowed"; + + /// + /// Passing the video portion of protected content to an Unknown Output is allowed but with constrained resolution. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption AllowedWithVideoConstriction = @"AllowedWithVideoConstriction"; + + /// + /// Passing the video portion of protected content to an Unknown Output is not allowed. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption NotAllowed = @"NotAllowed"; + + /// + /// Represents a ContentKeyPolicyPlayReadyUnknownOutputPassingOption that is unavailable in current API version. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption Unknown = @"Unknown"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ContentKeyPolicyPlayReadyUnknownOutputPassingOption(string underlyingValue) + { + this._value = underlyingValue; + } + + /// + /// Conversion from arbitrary object to ContentKeyPolicyPlayReadyUnknownOutputPassingOption + /// + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ContentKeyPolicyPlayReadyUnknownOutputPassingOption(global::System.Convert.ToString(value)); + } + + /// + /// Compares values of enum type ContentKeyPolicyPlayReadyUnknownOutputPassingOption + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type ContentKeyPolicyPlayReadyUnknownOutputPassingOption (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ContentKeyPolicyPlayReadyUnknownOutputPassingOption && Equals((ContentKeyPolicyPlayReadyUnknownOutputPassingOption)obj); + } + + /// Returns hashCode for enum ContentKeyPolicyPlayReadyUnknownOutputPassingOption + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Returns string representation for ContentKeyPolicyPlayReadyUnknownOutputPassingOption + /// + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// + /// Implicit operator to convert string to ContentKeyPolicyPlayReadyUnknownOutputPassingOption + /// + /// the value to convert to an instance of . + + public static implicit operator ContentKeyPolicyPlayReadyUnknownOutputPassingOption(string value) + { + return new ContentKeyPolicyPlayReadyUnknownOutputPassingOption(value); + } + + /// + /// Implicit operator to convert ContentKeyPolicyPlayReadyUnknownOutputPassingOption to string + /// + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption e) + { + return e._value; + } + + /// + /// Overriding != operator for enum ContentKeyPolicyPlayReadyUnknownOutputPassingOption + /// + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption e2) + { + return !e2.Equals(e1); + } + + /// + /// Overriding == operator for enum ContentKeyPolicyPlayReadyUnknownOutputPassingOption + /// + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyPlayReadyUnknownOutputPassingOption e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyRestrictionTokenType.cs b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyRestrictionTokenType.cs new file mode 100644 index 000000000000..32d1fcc378f7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/ContentKeyPolicyRestrictionTokenType.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The type of token. + public partial struct ContentKeyPolicyRestrictionTokenType : + System.IEquatable + { + /// JSON Web Token. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType Jwt = @"Jwt"; + + /// Simple Web Token. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType Swt = @"Swt"; + + /// + /// Represents a ContentKeyPolicyRestrictionTokenType that is unavailable in current API version. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType Unknown = @"Unknown"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ContentKeyPolicyRestrictionTokenType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ContentKeyPolicyRestrictionTokenType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ContentKeyPolicyRestrictionTokenType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ContentKeyPolicyRestrictionTokenType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type ContentKeyPolicyRestrictionTokenType (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ContentKeyPolicyRestrictionTokenType && Equals((ContentKeyPolicyRestrictionTokenType)obj); + } + + /// Returns hashCode for enum ContentKeyPolicyRestrictionTokenType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ContentKeyPolicyRestrictionTokenType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ContentKeyPolicyRestrictionTokenType + /// the value to convert to an instance of . + + public static implicit operator ContentKeyPolicyRestrictionTokenType(string value) + { + return new ContentKeyPolicyRestrictionTokenType(value); + } + + /// Implicit operator to convert ContentKeyPolicyRestrictionTokenType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType e) + { + return e._value; + } + + /// Overriding != operator for enum ContentKeyPolicyRestrictionTokenType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ContentKeyPolicyRestrictionTokenType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ContentKeyPolicyRestrictionTokenType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/CreatedByType.cs b/swaggerci/mediaservices/generated/api/Support/CreatedByType.cs new file mode 100644 index 000000000000..792bf25a0793 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/CreatedByType.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The type of identity that created the resource. + public partial struct CreatedByType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType Application = @"Application"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType Key = @"Key"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType User = @"User"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to CreatedByType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CreatedByType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CreatedByType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type CreatedByType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CreatedByType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CreatedByType && Equals((CreatedByType)obj); + } + + /// Returns hashCode for enum CreatedByType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CreatedByType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CreatedByType + /// the value to convert to an instance of . + + public static implicit operator CreatedByType(string value) + { + return new CreatedByType(value); + } + + /// Implicit operator to convert CreatedByType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType e) + { + return e._value; + } + + /// Overriding != operator for enum CreatedByType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CreatedByType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.CreatedByType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/DefaultAction.cs b/swaggerci/mediaservices/generated/api/Support/DefaultAction.cs new file mode 100644 index 000000000000..631f48e0e4e1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/DefaultAction.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The behavior for IP access control in Key Delivery. + public partial struct DefaultAction : + System.IEquatable + { + /// All public IP addresses are allowed. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction Allow = @"Allow"; + + /// Public IP addresses are blocked. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction Deny = @"Deny"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DefaultAction + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DefaultAction(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DefaultAction(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DefaultAction + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DefaultAction (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DefaultAction && Equals((DefaultAction)obj); + } + + /// Returns hashCode for enum DefaultAction + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DefaultAction + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DefaultAction + /// the value to convert to an instance of . + + public static implicit operator DefaultAction(string value) + { + return new DefaultAction(value); + } + + /// Implicit operator to convert DefaultAction to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction e) + { + return e._value; + } + + /// Overriding != operator for enum DefaultAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DefaultAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DefaultAction e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/DeinterlaceMode.cs b/swaggerci/mediaservices/generated/api/Support/DeinterlaceMode.cs new file mode 100644 index 000000000000..9868a42dd8db --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/DeinterlaceMode.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The deinterlacing mode. Defaults to AutoPixelAdaptive. + public partial struct DeinterlaceMode : + System.IEquatable + { + /// Apply automatic pixel adaptive de-interlacing on each frame in the input video. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode AutoPixelAdaptive = @"AutoPixelAdaptive"; + + /// Disables de-interlacing of the source video. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode Off = @"Off"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DeinterlaceMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DeinterlaceMode(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DeinterlaceMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DeinterlaceMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DeinterlaceMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DeinterlaceMode && Equals((DeinterlaceMode)obj); + } + + /// Returns hashCode for enum DeinterlaceMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DeinterlaceMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DeinterlaceMode + /// the value to convert to an instance of . + + public static implicit operator DeinterlaceMode(string value) + { + return new DeinterlaceMode(value); + } + + /// Implicit operator to convert DeinterlaceMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode e) + { + return e._value; + } + + /// Overriding != operator for enum DeinterlaceMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DeinterlaceMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/DeinterlaceParity.cs b/swaggerci/mediaservices/generated/api/Support/DeinterlaceParity.cs new file mode 100644 index 000000000000..21ccc92db15d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/DeinterlaceParity.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The field parity for de-interlacing, defaults to Auto. + public partial struct DeinterlaceParity : + System.IEquatable + { + /// Automatically detect the order of fields + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity Auto = @"Auto"; + + /// Apply bottom field first processing of input video. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity BottomFieldFirst = @"BottomFieldFirst"; + + /// Apply top field first processing of input video. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity TopFieldFirst = @"TopFieldFirst"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DeinterlaceParity + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DeinterlaceParity(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DeinterlaceParity(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DeinterlaceParity + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DeinterlaceParity (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DeinterlaceParity && Equals((DeinterlaceParity)obj); + } + + /// Returns hashCode for enum DeinterlaceParity + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DeinterlaceParity + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DeinterlaceParity + /// the value to convert to an instance of . + + public static implicit operator DeinterlaceParity(string value) + { + return new DeinterlaceParity(value); + } + + /// Implicit operator to convert DeinterlaceParity to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity e) + { + return e._value; + } + + /// Overriding != operator for enum DeinterlaceParity + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DeinterlaceParity + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.DeinterlaceParity e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/EncoderNamedPreset.cs b/swaggerci/mediaservices/generated/api/Support/EncoderNamedPreset.cs new file mode 100644 index 000000000000..2f04cd8c985d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/EncoderNamedPreset.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The built-in preset to be used for encoding videos. + public partial struct EncoderNamedPreset : + System.IEquatable + { + /// Produces a single MP4 file containing only stereo audio encoded at 192 kbps. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset AacGoodQualityAudio = @"AACGoodQualityAudio"; + + /// + /// Produces a set of GOP aligned MP4 files with H.264 video and stereo AAC audio. Auto-generates a bitrate ladder based on + /// the input resolution, bitrate and frame rate. The auto-generated preset will never exceed the input resolution. For example, + /// if the input is 720p, output will remain 720p at best. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset AdaptiveStreaming = @"AdaptiveStreaming"; + + /// + /// Produces a set of GOP-aligned MP4s by using content-aware encoding. Given any input content, the service performs an initial + /// lightweight analysis of the input content, and uses the results to determine the optimal number of layers, appropriate + /// bitrate and resolution settings for delivery by adaptive streaming. This preset is particularly effective for low and + /// medium complexity videos, where the output files will be at lower bitrates but at a quality that still delivers a good + /// experience to viewers. The output will contain MP4 files with video and audio interleaved. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset ContentAwareEncoding = @"ContentAwareEncoding"; + + /// + /// Exposes an experimental preset for content-aware encoding. Given any input content, the service attempts to automatically + /// determine the optimal number of layers, appropriate bitrate and resolution settings for delivery by adaptive streaming. + /// The underlying algorithms will continue to evolve over time. The output will contain MP4 files with video and audio interleaved. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset ContentAwareEncodingExperimental = @"ContentAwareEncodingExperimental"; + + /// + /// Copy all video and audio streams from the input asset as non-interleaved video and audio output files. This preset can + /// be used to clip an existing asset or convert a group of key frame (GOP) aligned MP4 files as an asset that can be streamed. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset CopyAllBitrateNonInterleaved = @"CopyAllBitrateNonInterleaved"; + + /// + /// Produces a set of 8 GOP-aligned MP4 files, ranging from 6000 kbps to 400 kbps, and stereo AAC audio. Resolution starts + /// at 1080p and goes down to 180p. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H264MultipleBitrate1080P = @"H264MultipleBitrate1080p"; + + /// + /// Produces a set of 6 GOP-aligned MP4 files, ranging from 3400 kbps to 400 kbps, and stereo AAC audio. Resolution starts + /// at 720p and goes down to 180p. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H264MultipleBitrate720P = @"H264MultipleBitrate720p"; + + /// + /// Produces a set of 5 GOP-aligned MP4 files, ranging from 1900kbps to 400 kbps, and stereo AAC audio. Resolution starts + /// at 480p and goes down to 240p. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H264MultipleBitrateSd = @"H264MultipleBitrateSD"; + + /// + /// Produces an MP4 file where the video is encoded with H.264 codec at 6750 kbps and a picture height of 1080 pixels, and + /// the stereo audio is encoded with AAC-LC codec at 128 kbps. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H264SingleBitrate1080P = @"H264SingleBitrate1080p"; + + /// + /// Produces an MP4 file where the video is encoded with H.264 codec at 4500 kbps and a picture height of 720 pixels, and + /// the stereo audio is encoded with AAC-LC codec at 128 kbps. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H264SingleBitrate720P = @"H264SingleBitrate720p"; + + /// + /// Produces an MP4 file where the video is encoded with H.264 codec at 2200 kbps and a picture height of 480 pixels, and + /// the stereo audio is encoded with AAC-LC codec at 128 kbps. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H264SingleBitrateSd = @"H264SingleBitrateSD"; + + /// + /// Produces a set of GOP aligned MP4 files with H.265 video and stereo AAC audio. Auto-generates a bitrate ladder based on + /// the input resolution, bitrate and frame rate. The auto-generated preset will never exceed the input resolution. For example, + /// if the input is 720p, output will remain 720p at best. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H265AdaptiveStreaming = @"H265AdaptiveStreaming"; + + /// + /// Produces a set of GOP-aligned MP4s by using content-aware encoding. Given any input content, the service performs an initial + /// lightweight analysis of the input content, and uses the results to determine the optimal number of layers, appropriate + /// bitrate and resolution settings for delivery by adaptive streaming. This preset is particularly effective for low and + /// medium complexity videos, where the output files will be at lower bitrates but at a quality that still delivers a good + /// experience to viewers. The output will contain MP4 files with video and audio interleaved. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H265ContentAwareEncoding = @"H265ContentAwareEncoding"; + + /// + /// Produces an MP4 file where the video is encoded with H.265 codec at 3500 kbps and a picture height of 1080 pixels, and + /// the stereo audio is encoded with AAC-LC codec at 128 kbps. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H265SingleBitrate1080P = @"H265SingleBitrate1080p"; + + /// + /// Produces an MP4 file where the video is encoded with H.265 codec at 9500 kbps and a picture height of 2160 pixels, and + /// the stereo audio is encoded with AAC-LC codec at 128 kbps. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H265SingleBitrate4K = @"H265SingleBitrate4K"; + + /// + /// Produces an MP4 file where the video is encoded with H.265 codec at 1800 kbps and a picture height of 720 pixels, and + /// the stereo audio is encoded with AAC-LC codec at 128 kbps. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset H265SingleBitrate720P = @"H265SingleBitrate720p"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to EncoderNamedPreset + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new EncoderNamedPreset(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private EncoderNamedPreset(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type EncoderNamedPreset + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type EncoderNamedPreset (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is EncoderNamedPreset && Equals((EncoderNamedPreset)obj); + } + + /// Returns hashCode for enum EncoderNamedPreset + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for EncoderNamedPreset + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to EncoderNamedPreset + /// the value to convert to an instance of . + + public static implicit operator EncoderNamedPreset(string value) + { + return new EncoderNamedPreset(value); + } + + /// Implicit operator to convert EncoderNamedPreset to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset e) + { + return e._value; + } + + /// Overriding != operator for enum EncoderNamedPreset + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum EncoderNamedPreset + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncoderNamedPreset e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/EncryptionScheme.cs b/swaggerci/mediaservices/generated/api/Support/EncryptionScheme.cs new file mode 100644 index 000000000000..0101e79dad85 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/EncryptionScheme.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Encryption scheme + public partial struct EncryptionScheme : + System.IEquatable + { + /// CommonEncryptionCbcs scheme + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme CommonEncryptionCbcs = @"CommonEncryptionCbcs"; + + /// CommonEncryptionCenc scheme + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme CommonEncryptionCenc = @"CommonEncryptionCenc"; + + /// EnvelopeEncryption scheme + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme EnvelopeEncryption = @"EnvelopeEncryption"; + + /// NoEncryption scheme + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme NoEncryption = @"NoEncryption"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to EncryptionScheme + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new EncryptionScheme(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private EncryptionScheme(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type EncryptionScheme + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type EncryptionScheme (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is EncryptionScheme && Equals((EncryptionScheme)obj); + } + + /// Returns hashCode for enum EncryptionScheme + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for EncryptionScheme + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to EncryptionScheme + /// the value to convert to an instance of . + + public static implicit operator EncryptionScheme(string value) + { + return new EncryptionScheme(value); + } + + /// Implicit operator to convert EncryptionScheme to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme e) + { + return e._value; + } + + /// Overriding != operator for enum EncryptionScheme + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum EncryptionScheme + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EncryptionScheme e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/EntropyMode.cs b/swaggerci/mediaservices/generated/api/Support/EntropyMode.cs new file mode 100644 index 000000000000..51d59ce7bdd1 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/EntropyMode.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the + /// profile and level. + /// + public partial struct EntropyMode : + System.IEquatable + { + /// Context Adaptive Binary Arithmetic Coder (CABAC) entropy encoding. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode Cabac = @"Cabac"; + + /// Context Adaptive Variable Length Coder (CAVLC) entropy encoding. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode Cavlc = @"Cavlc"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to EntropyMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new EntropyMode(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private EntropyMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type EntropyMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type EntropyMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is EntropyMode && Equals((EntropyMode)obj); + } + + /// Returns hashCode for enum EntropyMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for EntropyMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to EntropyMode + /// the value to convert to an instance of . + + public static implicit operator EntropyMode(string value) + { + return new EntropyMode(value); + } + + /// Implicit operator to convert EntropyMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode e) + { + return e._value; + } + + /// Overriding != operator for enum EntropyMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum EntropyMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.EntropyMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/FaceRedactorMode.cs b/swaggerci/mediaservices/generated/api/Support/FaceRedactorMode.cs new file mode 100644 index 000000000000..6a06e0b5feeb --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/FaceRedactorMode.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates + /// a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person + /// are assigned the same ID. 2) Combined - Additionally redacts(blurs) detected faces. 3) Redact - This enables a 2-pass + /// process, allowing for selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze + /// pass, along with the source video, and a user-selected subset of IDs that require redaction. + /// + public partial struct FaceRedactorMode : + System.IEquatable + { + /// + /// Analyze mode detects faces and outputs a metadata file with the results. Allows editing of the metadata file before faces + /// are blurred with Redact mode. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode Analyze = @"Analyze"; + + /// + /// Combined mode does the Analyze and Redact steps in one pass when editing the analyzed faces is not desired. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode Combined = @"Combined"; + + /// + /// Redact mode consumes the metadata file from Analyze mode and redacts the faces found. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode Redact = @"Redact"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to FaceRedactorMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new FaceRedactorMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type FaceRedactorMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type FaceRedactorMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is FaceRedactorMode && Equals((FaceRedactorMode)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private FaceRedactorMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum FaceRedactorMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for FaceRedactorMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to FaceRedactorMode + /// the value to convert to an instance of . + + public static implicit operator FaceRedactorMode(string value) + { + return new FaceRedactorMode(value); + } + + /// Implicit operator to convert FaceRedactorMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode e) + { + return e._value; + } + + /// Overriding != operator for enum FaceRedactorMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum FaceRedactorMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FaceRedactorMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/FilterTrackPropertyCompareOperation.cs b/swaggerci/mediaservices/generated/api/Support/FilterTrackPropertyCompareOperation.cs new file mode 100644 index 000000000000..93d4775a4eb6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/FilterTrackPropertyCompareOperation.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The track property condition operation. + public partial struct FilterTrackPropertyCompareOperation : + System.IEquatable + { + /// The equal operation. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation Equal = @"Equal"; + + /// The not equal operation. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation NotEqual = @"NotEqual"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to FilterTrackPropertyCompareOperation + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new FilterTrackPropertyCompareOperation(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type FilterTrackPropertyCompareOperation + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type FilterTrackPropertyCompareOperation (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is FilterTrackPropertyCompareOperation && Equals((FilterTrackPropertyCompareOperation)obj); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private FilterTrackPropertyCompareOperation(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum FilterTrackPropertyCompareOperation + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for FilterTrackPropertyCompareOperation + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to FilterTrackPropertyCompareOperation + /// the value to convert to an instance of . + + public static implicit operator FilterTrackPropertyCompareOperation(string value) + { + return new FilterTrackPropertyCompareOperation(value); + } + + /// Implicit operator to convert FilterTrackPropertyCompareOperation to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation e) + { + return e._value; + } + + /// Overriding != operator for enum FilterTrackPropertyCompareOperation + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum FilterTrackPropertyCompareOperation + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyCompareOperation e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/FilterTrackPropertyType.cs b/swaggerci/mediaservices/generated/api/Support/FilterTrackPropertyType.cs new file mode 100644 index 000000000000..cf1419859017 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/FilterTrackPropertyType.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The track property type. + public partial struct FilterTrackPropertyType : + System.IEquatable + { + /// The bitrate. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType Bitrate = @"Bitrate"; + + /// The fourCC. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType FourCc = @"FourCC"; + + /// The language. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType Language = @"Language"; + + /// The name. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType Name = @"Name"; + + /// The type. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType Type = @"Type"; + + /// The unknown track property type. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType Unknown = @"Unknown"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to FilterTrackPropertyType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new FilterTrackPropertyType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type FilterTrackPropertyType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type FilterTrackPropertyType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is FilterTrackPropertyType && Equals((FilterTrackPropertyType)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private FilterTrackPropertyType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum FilterTrackPropertyType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for FilterTrackPropertyType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to FilterTrackPropertyType + /// the value to convert to an instance of . + + public static implicit operator FilterTrackPropertyType(string value) + { + return new FilterTrackPropertyType(value); + } + + /// Implicit operator to convert FilterTrackPropertyType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType e) + { + return e._value; + } + + /// Overriding != operator for enum FilterTrackPropertyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum FilterTrackPropertyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.FilterTrackPropertyType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/H264Complexity.cs b/swaggerci/mediaservices/generated/api/Support/H264Complexity.cs new file mode 100644 index 000000000000..28c9ec3c4743 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/H264Complexity.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Tells the encoder how to choose its encoding settings. The default value is Balanced. + /// + public partial struct H264Complexity : + System.IEquatable + { + /// + /// Tells the encoder to use settings that achieve a balance between speed and quality. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity Balanced = @"Balanced"; + + /// + /// Tells the encoder to use settings that are optimized to produce higher quality output at the expense of slower overall + /// encode time. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity Quality = @"Quality"; + + /// + /// Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed to decrease encoding time. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity Speed = @"Speed"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to H264Complexity + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new H264Complexity(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type H264Complexity + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type H264Complexity (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is H264Complexity && Equals((H264Complexity)obj); + } + + /// Returns hashCode for enum H264Complexity + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private H264Complexity(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for H264Complexity + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to H264Complexity + /// the value to convert to an instance of . + + public static implicit operator H264Complexity(string value) + { + return new H264Complexity(value); + } + + /// Implicit operator to convert H264Complexity to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity e) + { + return e._value; + } + + /// Overriding != operator for enum H264Complexity + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum H264Complexity + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264Complexity e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/H264RateControlMode.cs b/swaggerci/mediaservices/generated/api/Support/H264RateControlMode.cs new file mode 100644 index 000000000000..7718ca9c4965 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/H264RateControlMode.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The video rate control mode + public partial struct H264RateControlMode : + System.IEquatable + { + /// Average Bitrate (ABR) mode that hits the target bitrate: Default mode. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode Abr = @"ABR"; + + /// + /// Constant Bitrate (CBR) mode that tightens bitrate variations around target bitrate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode Cbr = @"CBR"; + + /// Constant Rate Factor (CRF) mode that targets at constant subjective quality. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode Crf = @"CRF"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to H264RateControlMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new H264RateControlMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type H264RateControlMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type H264RateControlMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is H264RateControlMode && Equals((H264RateControlMode)obj); + } + + /// Returns hashCode for enum H264RateControlMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private H264RateControlMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for H264RateControlMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to H264RateControlMode + /// the value to convert to an instance of . + + public static implicit operator H264RateControlMode(string value) + { + return new H264RateControlMode(value); + } + + /// Implicit operator to convert H264RateControlMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode e) + { + return e._value; + } + + /// Overriding != operator for enum H264RateControlMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum H264RateControlMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264RateControlMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/H264VideoProfile.cs b/swaggerci/mediaservices/generated/api/Support/H264VideoProfile.cs new file mode 100644 index 000000000000..eb2fcbb482fa --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/H264VideoProfile.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// We currently support Baseline, Main, High, High422, High444. Default is Auto. + public partial struct H264VideoProfile : + System.IEquatable + { + /// Tells the encoder to automatically determine the appropriate H.264 profile. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile Auto = @"Auto"; + + /// Baseline profile + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile Baseline = @"Baseline"; + + /// High profile. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile High = @"High"; + + /// High 4:2:2 profile. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile High422 = @"High422"; + + /// High 4:4:4 predictive profile. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile High444 = @"High444"; + + /// Main profile + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile Main = @"Main"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to H264VideoProfile + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new H264VideoProfile(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type H264VideoProfile + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type H264VideoProfile (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is H264VideoProfile && Equals((H264VideoProfile)obj); + } + + /// Returns hashCode for enum H264VideoProfile + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private H264VideoProfile(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for H264VideoProfile + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to H264VideoProfile + /// the value to convert to an instance of . + + public static implicit operator H264VideoProfile(string value) + { + return new H264VideoProfile(value); + } + + /// Implicit operator to convert H264VideoProfile to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile e) + { + return e._value; + } + + /// Overriding != operator for enum H264VideoProfile + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum H264VideoProfile + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H264VideoProfile e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/H265Complexity.cs b/swaggerci/mediaservices/generated/api/Support/H265Complexity.cs new file mode 100644 index 000000000000..e5dbc1376c07 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/H265Complexity.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Tells the encoder how to choose its encoding settings. Quality will provide for a higher compression ratio but at a higher + /// cost and longer compute time. Speed will produce a relatively larger file but is faster and more economical. The default + /// value is Balanced. + /// + public partial struct H265Complexity : + System.IEquatable + { + /// + /// Tells the encoder to use settings that achieve a balance between speed and quality. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity Balanced = @"Balanced"; + + /// + /// Tells the encoder to use settings that are optimized to produce higher quality output at the expense of slower overall + /// encode time. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity Quality = @"Quality"; + + /// + /// Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed to decrease encoding time. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity Speed = @"Speed"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to H265Complexity + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new H265Complexity(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type H265Complexity + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type H265Complexity (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is H265Complexity && Equals((H265Complexity)obj); + } + + /// Returns hashCode for enum H265Complexity + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private H265Complexity(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for H265Complexity + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to H265Complexity + /// the value to convert to an instance of . + + public static implicit operator H265Complexity(string value) + { + return new H265Complexity(value); + } + + /// Implicit operator to convert H265Complexity to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity e) + { + return e._value; + } + + /// Overriding != operator for enum H265Complexity + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum H265Complexity + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265Complexity e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/H265VideoProfile.cs b/swaggerci/mediaservices/generated/api/Support/H265VideoProfile.cs new file mode 100644 index 000000000000..e3028c251c9a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/H265VideoProfile.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// We currently support Main. Default is Auto. + public partial struct H265VideoProfile : + System.IEquatable + { + /// Tells the encoder to automatically determine the appropriate H.265 profile. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile Auto = @"Auto"; + + /// + /// Main profile (https://x265.readthedocs.io/en/default/cli.html?highlight=profile#profile-level-tier) + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile Main = @"Main"; + + /// + /// Main 10 profile (https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Main_10) + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile Main10 = @"Main10"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to H265VideoProfile + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new H265VideoProfile(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type H265VideoProfile + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type H265VideoProfile (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is H265VideoProfile && Equals((H265VideoProfile)obj); + } + + /// Returns hashCode for enum H265VideoProfile + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private H265VideoProfile(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for H265VideoProfile + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to H265VideoProfile + /// the value to convert to an instance of . + + public static implicit operator H265VideoProfile(string value) + { + return new H265VideoProfile(value); + } + + /// Implicit operator to convert H265VideoProfile to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile e) + { + return e._value; + } + + /// Overriding != operator for enum H265VideoProfile + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum H265VideoProfile + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.H265VideoProfile e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/InsightsType.cs b/swaggerci/mediaservices/generated/api/Support/InsightsType.cs new file mode 100644 index 000000000000..84c90e2228c6 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/InsightsType.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', + /// and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio + /// insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended + /// that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you + /// expect some of your inputs to be audio only. Your Jobs in such conditions would error out. + /// + public partial struct InsightsType : + System.IEquatable + { + /// + /// Generate both audio and video insights. Fails if either audio or video Insights fail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType AllInsights = @"AllInsights"; + + /// + /// Generate audio only insights. Ignore video even if present. Fails if no audio is present. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType AudioInsightsOnly = @"AudioInsightsOnly"; + + /// + /// Generate video only insights. Ignore audio if present. Fails if no video is present. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType VideoInsightsOnly = @"VideoInsightsOnly"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to InsightsType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new InsightsType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type InsightsType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type InsightsType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is InsightsType && Equals((InsightsType)obj); + } + + /// Returns hashCode for enum InsightsType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private InsightsType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for InsightsType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to InsightsType + /// the value to convert to an instance of . + + public static implicit operator InsightsType(string value) + { + return new InsightsType(value); + } + + /// Implicit operator to convert InsightsType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType e) + { + return e._value; + } + + /// Overriding != operator for enum InsightsType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum InsightsType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InsightsType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/InterleaveOutput.cs b/swaggerci/mediaservices/generated/api/Support/InterleaveOutput.cs new file mode 100644 index 000000000000..adcbb356a97e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/InterleaveOutput.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set + /// InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files. + /// + public partial struct InterleaveOutput : + System.IEquatable + { + /// The output includes both audio and video. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput InterleavedOutput = @"InterleavedOutput"; + + /// The output is video-only or audio-only. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput NonInterleavedOutput = @"NonInterleavedOutput"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to InterleaveOutput + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new InterleaveOutput(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type InterleaveOutput + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type InterleaveOutput (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is InterleaveOutput && Equals((InterleaveOutput)obj); + } + + /// Returns hashCode for enum InterleaveOutput + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private InterleaveOutput(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for InterleaveOutput + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to InterleaveOutput + /// the value to convert to an instance of . + + public static implicit operator InterleaveOutput(string value) + { + return new InterleaveOutput(value); + } + + /// Implicit operator to convert InterleaveOutput to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput e) + { + return e._value; + } + + /// Overriding != operator for enum InterleaveOutput + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum InterleaveOutput + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.InterleaveOutput e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/JobErrorCategory.cs b/swaggerci/mediaservices/generated/api/Support/JobErrorCategory.cs new file mode 100644 index 000000000000..f97a97c4c035 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/JobErrorCategory.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Helps with categorization of errors. + public partial struct JobErrorCategory : + System.IEquatable + { + /// The error is configuration related. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory Configuration = @"Configuration"; + + /// The error is related to data in the input files. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory Content = @"Content"; + + /// The error is download related. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory Download = @"Download"; + + /// The error is service related. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory Service = @"Service"; + + /// The error is upload related. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory Upload = @"Upload"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to JobErrorCategory + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new JobErrorCategory(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type JobErrorCategory + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type JobErrorCategory (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is JobErrorCategory && Equals((JobErrorCategory)obj); + } + + /// Returns hashCode for enum JobErrorCategory + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private JobErrorCategory(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for JobErrorCategory + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to JobErrorCategory + /// the value to convert to an instance of . + + public static implicit operator JobErrorCategory(string value) + { + return new JobErrorCategory(value); + } + + /// Implicit operator to convert JobErrorCategory to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory e) + { + return e._value; + } + + /// Overriding != operator for enum JobErrorCategory + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum JobErrorCategory + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCategory e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/JobErrorCode.cs b/swaggerci/mediaservices/generated/api/Support/JobErrorCode.cs new file mode 100644 index 000000000000..7b77f0b040de --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/JobErrorCode.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Error code describing the error. + public partial struct JobErrorCode : + System.IEquatable + { + /// + /// There was a problem with the combination of input files and the configuration settings applied, fix the configuration + /// settings and retry with the same input, or change input to match the configuration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode ConfigurationUnsupported = @"ConfigurationUnsupported"; + + /// + /// There was a problem with the input content (for example: zero byte files, or corrupt/non-decodable files), check the input + /// files. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode ContentMalformed = @"ContentMalformed"; + + /// + /// There was a problem with the format of the input (not valid media file, or an unsupported file/codec), check the validity + /// of the input files. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode ContentUnsupported = @"ContentUnsupported"; + + /// + /// While trying to download the input files, the files were not accessible, please check the availability of the source. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode DownloadNotAccessible = @"DownloadNotAccessible"; + + /// + /// While trying to download the input files, there was an issue during transfer (storage service, network errors), see details + /// and check your source. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode DownloadTransientError = @"DownloadTransientError"; + + /// Fatal service error, please contact support. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode ServiceError = @"ServiceError"; + + /// + /// Transient error, please retry, if retry is unsuccessful, please contact support. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode ServiceTransientError = @"ServiceTransientError"; + + /// + /// While trying to upload the output files, the destination was not reachable, please check the availability of the destination. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode UploadNotAccessible = @"UploadNotAccessible"; + + /// + /// While trying to upload the output files, there was an issue during transfer (storage service, network errors), see details + /// and check your destination. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode UploadTransientError = @"UploadTransientError"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to JobErrorCode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new JobErrorCode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type JobErrorCode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type JobErrorCode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is JobErrorCode && Equals((JobErrorCode)obj); + } + + /// Returns hashCode for enum JobErrorCode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private JobErrorCode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for JobErrorCode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to JobErrorCode + /// the value to convert to an instance of . + + public static implicit operator JobErrorCode(string value) + { + return new JobErrorCode(value); + } + + /// Implicit operator to convert JobErrorCode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode e) + { + return e._value; + } + + /// Overriding != operator for enum JobErrorCode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum JobErrorCode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobErrorCode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/JobRetry.cs b/swaggerci/mediaservices/generated/api/Support/JobRetry.cs new file mode 100644 index 000000000000..a10258a4e48d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/JobRetry.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. + /// + public partial struct JobRetry : + System.IEquatable + { + /// + /// Issue needs to be investigated and then the job resubmitted with corrections or retried once the underlying issue has + /// been corrected. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry DoNotRetry = @"DoNotRetry"; + + /// + /// Issue may be resolved after waiting for a period of time and resubmitting the same Job. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry MayRetry = @"MayRetry"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to JobRetry + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new JobRetry(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type JobRetry + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type JobRetry (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is JobRetry && Equals((JobRetry)obj); + } + + /// Returns hashCode for enum JobRetry + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private JobRetry(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for JobRetry + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to JobRetry + /// the value to convert to an instance of . + + public static implicit operator JobRetry(string value) + { + return new JobRetry(value); + } + + /// Implicit operator to convert JobRetry to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry e) + { + return e._value; + } + + /// Overriding != operator for enum JobRetry + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum JobRetry + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobRetry e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/JobState.cs b/swaggerci/mediaservices/generated/api/Support/JobState.cs new file mode 100644 index 000000000000..4b58c375903b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/JobState.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Describes the state of the JobOutput. + public partial struct JobState : + System.IEquatable + { + /// The job was canceled. This is a final state for the job. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState Canceled = @"Canceled"; + + /// + /// The job is in the process of being canceled. This is a transient state for the job. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState Canceling = @"Canceling"; + + /// The job has encountered an error. This is a final state for the job. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState Error = @"Error"; + + /// The job is finished. This is a final state for the job. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState Finished = @"Finished"; + + /// The job is processing. This is a transient state for the job. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState Processing = @"Processing"; + + /// + /// The job is in a queued state, waiting for resources to become available. This is a transient state. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState Queued = @"Queued"; + + /// + /// The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState Scheduled = @"Scheduled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to JobState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new JobState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type JobState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type JobState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is JobState && Equals((JobState)obj); + } + + /// Returns hashCode for enum JobState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private JobState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for JobState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to JobState + /// the value to convert to an instance of . + + public static implicit operator JobState(string value) + { + return new JobState(value); + } + + /// Implicit operator to convert JobState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState e) + { + return e._value; + } + + /// Overriding != operator for enum JobState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum JobState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.JobState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/LiveEventEncodingType.cs b/swaggerci/mediaservices/generated/api/Support/LiveEventEncodingType.cs new file mode 100644 index 000000000000..ec2db0a94029 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/LiveEventEncodingType.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// 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. + /// + public partial struct LiveEventEncodingType : + System.IEquatable + { + /// + /// This is the same as PassthroughStandard, please see description below. This enumeration value is being deprecated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType None = @"None"; + + /// + /// The ingested stream passes through the live event from the contribution encoder without any further processing. In the + /// PassthroughBasic mode, ingestion is limited to up to 5Mbps and only 1 concurrent live output is allowed. Live transcription + /// is not available. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType PassthroughBasic = @"PassthroughBasic"; + + /// + /// The ingested stream passes through the live event from the contribution encoder without any further processing. Live transcription + /// is available. Ingestion bitrate limits are much higher and up to 3 concurrent live outputs are allowed. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType PassthroughStandard = @"PassthroughStandard"; + + /// + /// A contribution live encoder sends a single bitrate stream to the live event and Media Services creates multiple bitrate + /// streams. The output cannot exceed 1080p in resolution. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType Premium1080P = @"Premium1080p"; + + /// + /// A contribution live encoder sends a single bitrate stream to the live event and Media Services creates multiple bitrate + /// streams. The output cannot exceed 720p in resolution. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType Standard = @"Standard"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LiveEventEncodingType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LiveEventEncodingType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LiveEventEncodingType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LiveEventEncodingType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LiveEventEncodingType && Equals((LiveEventEncodingType)obj); + } + + /// Returns hashCode for enum LiveEventEncodingType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LiveEventEncodingType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LiveEventEncodingType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LiveEventEncodingType + /// the value to convert to an instance of . + + public static implicit operator LiveEventEncodingType(string value) + { + return new LiveEventEncodingType(value); + } + + /// Implicit operator to convert LiveEventEncodingType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType e) + { + return e._value; + } + + /// Overriding != operator for enum LiveEventEncodingType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LiveEventEncodingType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventEncodingType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/LiveEventInputProtocol.cs b/swaggerci/mediaservices/generated/api/Support/LiveEventInputProtocol.cs new file mode 100644 index 000000000000..7a9aa5e86705 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/LiveEventInputProtocol.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// The input protocol for the live event. This is specified at creation time and cannot be updated. + /// + public partial struct LiveEventInputProtocol : + System.IEquatable + { + /// + /// Smooth Streaming input will be sent by the contribution encoder to the live event. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol FragmentedMp4 = @"FragmentedMP4"; + + /// RTMP input will be sent by the contribution encoder to the live event. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol Rtmp = @"RTMP"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LiveEventInputProtocol + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LiveEventInputProtocol(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LiveEventInputProtocol + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LiveEventInputProtocol (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LiveEventInputProtocol && Equals((LiveEventInputProtocol)obj); + } + + /// Returns hashCode for enum LiveEventInputProtocol + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LiveEventInputProtocol(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LiveEventInputProtocol + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LiveEventInputProtocol + /// the value to convert to an instance of . + + public static implicit operator LiveEventInputProtocol(string value) + { + return new LiveEventInputProtocol(value); + } + + /// Implicit operator to convert LiveEventInputProtocol to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol e) + { + return e._value; + } + + /// Overriding != operator for enum LiveEventInputProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LiveEventInputProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventInputProtocol e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/LiveEventResourceState.cs b/swaggerci/mediaservices/generated/api/Support/LiveEventResourceState.cs new file mode 100644 index 000000000000..de41d8b9a994 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/LiveEventResourceState.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + /// + public partial struct LiveEventResourceState : + System.IEquatable + { + /// + /// Allocate action was called on the live event and resources are being provisioned for this live event. Once allocation + /// completes successfully, the live event will transition to StandBy state. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState Allocating = @"Allocating"; + + /// + /// The live event is being deleted. No billing occurs in this transient state. Updates or streaming are not allowed during + /// this state. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState Deleting = @"Deleting"; + + /// + /// The live event resources have been allocated, ingest and preview URLs have been generated, and it is capable of receiving + /// live streams. At this point, billing is active. You must explicitly call Stop on the live event resource to halt further + /// billing. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState Running = @"Running"; + + /// + /// Live event resources have been provisioned and is ready to start. Billing occurs in this state. Most properties can still + /// be updated, however ingest or streaming is not allowed during this state. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState StandBy = @"StandBy"; + + /// + /// The live event is being started and resources are being allocated. No billing occurs in this state. Updates or streaming + /// are not allowed during this state. If an error occurs, the live event returns to the Stopped state. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState Starting = @"Starting"; + + /// + /// This is the initial state of the live event after creation (unless autostart was set to true.) No billing occurs in this + /// state. In this state, the live event properties can be updated but streaming is not allowed. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState Stopped = @"Stopped"; + + /// + /// The live event is being stopped and resources are being de-provisioned. No billing occurs in this transient state. Updates + /// or streaming are not allowed during this state. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState Stopping = @"Stopping"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LiveEventResourceState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LiveEventResourceState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LiveEventResourceState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LiveEventResourceState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LiveEventResourceState && Equals((LiveEventResourceState)obj); + } + + /// Returns hashCode for enum LiveEventResourceState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LiveEventResourceState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LiveEventResourceState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LiveEventResourceState + /// the value to convert to an instance of . + + public static implicit operator LiveEventResourceState(string value) + { + return new LiveEventResourceState(value); + } + + /// Implicit operator to convert LiveEventResourceState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState e) + { + return e._value; + } + + /// Overriding != operator for enum LiveEventResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LiveEventResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveEventResourceState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/LiveOutputResourceState.cs b/swaggerci/mediaservices/generated/api/Support/LiveOutputResourceState.cs new file mode 100644 index 000000000000..14c480b558e8 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/LiveOutputResourceState.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The resource state of the live output. + public partial struct LiveOutputResourceState : + System.IEquatable + { + /// + /// Live output is being created. No content is archived in the asset until the live output is in running state. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState Creating = @"Creating"; + + /// + /// Live output is being deleted. The live asset is being converted from live to on-demand asset. Any streaming URLs created + /// on the live output asset continue to work. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState Deleting = @"Deleting"; + + /// + /// Live output is running and archiving live streaming content to the asset if there is valid input from a contribution encoder. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState Running = @"Running"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LiveOutputResourceState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LiveOutputResourceState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LiveOutputResourceState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LiveOutputResourceState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LiveOutputResourceState && Equals((LiveOutputResourceState)obj); + } + + /// Returns hashCode for enum LiveOutputResourceState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LiveOutputResourceState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LiveOutputResourceState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LiveOutputResourceState + /// the value to convert to an instance of . + + public static implicit operator LiveOutputResourceState(string value) + { + return new LiveOutputResourceState(value); + } + + /// Implicit operator to convert LiveOutputResourceState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState e) + { + return e._value; + } + + /// Overriding != operator for enum LiveOutputResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LiveOutputResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.LiveOutputResourceState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/MetricAggregationType.cs b/swaggerci/mediaservices/generated/api/Support/MetricAggregationType.cs new file mode 100644 index 000000000000..0054a8b7228f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/MetricAggregationType.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The metric aggregation type + public partial struct MetricAggregationType : + System.IEquatable + { + /// The average. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType Average = @"Average"; + + /// The count of a number of items, usually requests. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType Count = @"Count"; + + /// The sum. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType Total = @"Total"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to MetricAggregationType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new MetricAggregationType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type MetricAggregationType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type MetricAggregationType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is MetricAggregationType && Equals((MetricAggregationType)obj); + } + + /// Returns hashCode for enum MetricAggregationType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private MetricAggregationType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for MetricAggregationType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to MetricAggregationType + /// the value to convert to an instance of . + + public static implicit operator MetricAggregationType(string value) + { + return new MetricAggregationType(value); + } + + /// Implicit operator to convert MetricAggregationType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType e) + { + return e._value; + } + + /// Overriding != operator for enum MetricAggregationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum MetricAggregationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricAggregationType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/MetricUnit.cs b/swaggerci/mediaservices/generated/api/Support/MetricUnit.cs new file mode 100644 index 000000000000..f97bd5190efa --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/MetricUnit.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The metric unit + public partial struct MetricUnit : + System.IEquatable + { + /// The number of bytes. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit Bytes = @"Bytes"; + + /// The count. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit Count = @"Count"; + + /// The number of milliseconds. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit Milliseconds = @"Milliseconds"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to MetricUnit + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new MetricUnit(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type MetricUnit + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type MetricUnit (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is MetricUnit && Equals((MetricUnit)obj); + } + + /// Returns hashCode for enum MetricUnit + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private MetricUnit(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for MetricUnit + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to MetricUnit + /// the value to convert to an instance of . + + public static implicit operator MetricUnit(string value) + { + return new MetricUnit(value); + } + + /// Implicit operator to convert MetricUnit to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit e) + { + return e._value; + } + + /// Overriding != operator for enum MetricUnit + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum MetricUnit + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.MetricUnit e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/OnErrorType.cs b/swaggerci/mediaservices/generated/api/Support/OnErrorType.cs new file mode 100644 index 000000000000..4fa7d344422c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/OnErrorType.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// A Transform can define more than one outputs. This property defines what the service should do when one output fails - + /// either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures + /// of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'. + /// + public partial struct OnErrorType : + System.IEquatable + { + /// + /// Tells the service that if this TransformOutput fails, then allow any other TransformOutput to continue. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType ContinueJob = @"ContinueJob"; + + /// + /// Tells the service that if this TransformOutput fails, then any other incomplete TransformOutputs can be stopped. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType StopProcessingJob = @"StopProcessingJob"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to OnErrorType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OnErrorType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OnErrorType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type OnErrorType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OnErrorType && Equals((OnErrorType)obj); + } + + /// Returns hashCode for enum OnErrorType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private OnErrorType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OnErrorType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OnErrorType + /// the value to convert to an instance of . + + public static implicit operator OnErrorType(string value) + { + return new OnErrorType(value); + } + + /// Implicit operator to convert OnErrorType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType e) + { + return e._value; + } + + /// Overriding != operator for enum OnErrorType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OnErrorType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.OnErrorType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/Priority.cs b/swaggerci/mediaservices/generated/api/Support/Priority.cs new file mode 100644 index 000000000000..c84c219d13ba --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/Priority.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for + /// processing TransformOutputs. The default priority is Normal. + /// + public partial struct Priority : + System.IEquatable + { + /// Used for TransformOutputs that should take precedence over others. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority High = @"High"; + + /// + /// Used for TransformOutputs that can be generated after Normal and High priority TransformOutputs. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority Low = @"Low"; + + /// Used for TransformOutputs that can be generated at Normal priority. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority Normal = @"Normal"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Priority + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Priority(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Priority + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Priority (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Priority && Equals((Priority)obj); + } + + /// Returns hashCode for enum Priority + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Priority(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for Priority + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Priority + /// the value to convert to an instance of . + + public static implicit operator Priority(string value) + { + return new Priority(value); + } + + /// Implicit operator to convert Priority to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority e) + { + return e._value; + } + + /// Overriding != operator for enum Priority + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Priority + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Priority e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs b/swaggerci/mediaservices/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs new file mode 100644 index 000000000000..2bbf3b29910d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The current provisioning state. + public partial struct PrivateEndpointConnectionProvisioningState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState Creating = @"Creating"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState Deleting = @"Deleting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState Succeeded = @"Succeeded"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to PrivateEndpointConnectionProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PrivateEndpointConnectionProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PrivateEndpointConnectionProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type PrivateEndpointConnectionProvisioningState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PrivateEndpointConnectionProvisioningState && Equals((PrivateEndpointConnectionProvisioningState)obj); + } + + /// Returns hashCode for enum PrivateEndpointConnectionProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private PrivateEndpointConnectionProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PrivateEndpointConnectionProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// + /// Implicit operator to convert string to PrivateEndpointConnectionProvisioningState + /// + /// the value to convert to an instance of . + + public static implicit operator PrivateEndpointConnectionProvisioningState(string value) + { + return new PrivateEndpointConnectionProvisioningState(value); + } + + /// + /// Implicit operator to convert PrivateEndpointConnectionProvisioningState to string + /// + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum PrivateEndpointConnectionProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PrivateEndpointConnectionProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointConnectionProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/PrivateEndpointServiceConnectionStatus.cs b/swaggerci/mediaservices/generated/api/Support/PrivateEndpointServiceConnectionStatus.cs new file mode 100644 index 000000000000..a29bdf265d2e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/PrivateEndpointServiceConnectionStatus.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The private endpoint connection status. + public partial struct PrivateEndpointServiceConnectionStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus Approved = @"Approved"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus Pending = @"Pending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus Rejected = @"Rejected"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to PrivateEndpointServiceConnectionStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PrivateEndpointServiceConnectionStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PrivateEndpointServiceConnectionStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type PrivateEndpointServiceConnectionStatus (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PrivateEndpointServiceConnectionStatus && Equals((PrivateEndpointServiceConnectionStatus)obj); + } + + /// Returns hashCode for enum PrivateEndpointServiceConnectionStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private PrivateEndpointServiceConnectionStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PrivateEndpointServiceConnectionStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PrivateEndpointServiceConnectionStatus + /// the value to convert to an instance of . + + public static implicit operator PrivateEndpointServiceConnectionStatus(string value) + { + return new PrivateEndpointServiceConnectionStatus(value); + } + + /// Implicit operator to convert PrivateEndpointServiceConnectionStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus e) + { + return e._value; + } + + /// Overriding != operator for enum PrivateEndpointServiceConnectionStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PrivateEndpointServiceConnectionStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PrivateEndpointServiceConnectionStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/ProvisioningState.cs b/swaggerci/mediaservices/generated/api/Support/ProvisioningState.cs new file mode 100644 index 000000000000..fcd356cf563c --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/ProvisioningState.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Provisioning state of the Media Services account. + public partial struct ProvisioningState : + System.IEquatable + { + /// Provisioning state failed. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState Failed = @"Failed"; + + /// Provisioning state in progress. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState InProgress = @"InProgress"; + + /// Provisioning state succeeded. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState Succeeded = @"Succeeded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProvisioningState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProvisioningState && Equals((ProvisioningState)obj); + } + + /// Returns hashCode for enum ProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProvisioningState + /// the value to convert to an instance of . + + public static implicit operator ProvisioningState(string value) + { + return new ProvisioningState(value); + } + + /// Implicit operator to convert ProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum ProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.ProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/PublicNetworkAccess.cs b/swaggerci/mediaservices/generated/api/Support/PublicNetworkAccess.cs new file mode 100644 index 000000000000..af562f4faab4 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/PublicNetworkAccess.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// Whether or not public network access is allowed for resources under the Media Services account. + /// + public partial struct PublicNetworkAccess : + System.IEquatable + { + /// Public network access is disabled. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess Disabled = @"Disabled"; + + /// Public network access is enabled. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PublicNetworkAccess + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PublicNetworkAccess(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PublicNetworkAccess + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PublicNetworkAccess (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PublicNetworkAccess && Equals((PublicNetworkAccess)obj); + } + + /// Returns hashCode for enum PublicNetworkAccess + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PublicNetworkAccess(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PublicNetworkAccess + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PublicNetworkAccess + /// the value to convert to an instance of . + + public static implicit operator PublicNetworkAccess(string value) + { + return new PublicNetworkAccess(value); + } + + /// Implicit operator to convert PublicNetworkAccess to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess e) + { + return e._value; + } + + /// Overriding != operator for enum PublicNetworkAccess + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PublicNetworkAccess + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.PublicNetworkAccess e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/Rotation.cs b/swaggerci/mediaservices/generated/api/Support/Rotation.cs new file mode 100644 index 000000000000..881b3f52dea7 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/Rotation.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto + /// + public partial struct Rotation : + System.IEquatable + { + /// Automatically detect and rotate as needed. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation Auto = @"Auto"; + + /// + /// Do not rotate the video. If the output format supports it, any metadata about rotation is kept intact. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation None = @"None"; + + /// Do not rotate the video but remove any metadata about the rotation. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation Rotate0 = @"Rotate0"; + + /// Rotate 180 degrees clockwise. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation Rotate180 = @"Rotate180"; + + /// Rotate 270 degrees clockwise. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation Rotate270 = @"Rotate270"; + + /// Rotate 90 degrees clockwise. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation Rotate90 = @"Rotate90"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Rotation + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Rotation(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Rotation + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Rotation (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Rotation && Equals((Rotation)obj); + } + + /// Returns hashCode for enum Rotation + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Rotation(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for Rotation + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Rotation + /// the value to convert to an instance of . + + public static implicit operator Rotation(string value) + { + return new Rotation(value); + } + + /// Implicit operator to convert Rotation to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation e) + { + return e._value; + } + + /// Overriding != operator for enum Rotation + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Rotation + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Rotation e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/SecurityLevel.cs b/swaggerci/mediaservices/generated/api/Support/SecurityLevel.cs new file mode 100644 index 000000000000..d26f667c691a --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/SecurityLevel.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The security level. + public partial struct SecurityLevel : + System.IEquatable + { + /// For clients under development or test. No protection against unauthorized use. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel Sl150 = @"SL150"; + + /// + /// For hardened devices and applications consuming commercial content. Software or hardware protection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel Sl2000 = @"SL2000"; + + /// For hardened devices only. Hardware protection. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel Sl3000 = @"SL3000"; + + /// Represents a SecurityLevel that is unavailable in current API version. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel Unknown = @"Unknown"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SecurityLevel + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SecurityLevel(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SecurityLevel + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SecurityLevel (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SecurityLevel && Equals((SecurityLevel)obj); + } + + /// Returns hashCode for enum SecurityLevel + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SecurityLevel(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SecurityLevel + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SecurityLevel + /// the value to convert to an instance of . + + public static implicit operator SecurityLevel(string value) + { + return new SecurityLevel(value); + } + + /// Implicit operator to convert SecurityLevel to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel e) + { + return e._value; + } + + /// Overriding != operator for enum SecurityLevel + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SecurityLevel + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.SecurityLevel e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/StorageAccountType.cs b/swaggerci/mediaservices/generated/api/Support/StorageAccountType.cs new file mode 100644 index 000000000000..ea1976754f5d --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/StorageAccountType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The type of the storage account. + public partial struct StorageAccountType : + System.IEquatable + { + /// The primary storage account for the Media Services account. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType Primary = @"Primary"; + + /// A secondary storage account for the Media Services account. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType Secondary = @"Secondary"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to StorageAccountType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StorageAccountType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StorageAccountType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type StorageAccountType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StorageAccountType && Equals((StorageAccountType)obj); + } + + /// Returns hashCode for enum StorageAccountType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private StorageAccountType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StorageAccountType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StorageAccountType + /// the value to convert to an instance of . + + public static implicit operator StorageAccountType(string value) + { + return new StorageAccountType(value); + } + + /// Implicit operator to convert StorageAccountType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType e) + { + return e._value; + } + + /// Overriding != operator for enum StorageAccountType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StorageAccountType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAccountType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/StorageAuthentication.cs b/swaggerci/mediaservices/generated/api/Support/StorageAuthentication.cs new file mode 100644 index 000000000000..e80a915bbf1e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/StorageAuthentication.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + public partial struct StorageAuthentication : + System.IEquatable + { + /// Managed Identity authentication. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication ManagedIdentity = @"ManagedIdentity"; + + /// System authentication. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication System = @"System"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to StorageAuthentication + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StorageAuthentication(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StorageAuthentication + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type StorageAuthentication (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StorageAuthentication && Equals((StorageAuthentication)obj); + } + + /// Returns hashCode for enum StorageAuthentication + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private StorageAuthentication(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StorageAuthentication + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StorageAuthentication + /// the value to convert to an instance of . + + public static implicit operator StorageAuthentication(string value) + { + return new StorageAuthentication(value); + } + + /// Implicit operator to convert StorageAuthentication to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication e) + { + return e._value; + } + + /// Overriding != operator for enum StorageAuthentication + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StorageAuthentication + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StorageAuthentication e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/StreamOptionsFlag.cs b/swaggerci/mediaservices/generated/api/Support/StreamOptionsFlag.cs new file mode 100644 index 000000000000..58085413e016 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/StreamOptionsFlag.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + public partial struct StreamOptionsFlag : + System.IEquatable + { + /// Live streaming with no special latency optimizations. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag Default = @"Default"; + + /// + /// The live event provides lower end to end latency by reducing its internal buffers. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag LowLatency = @"LowLatency"; + + /// + /// The live event is optimized for end to end latency. This option is only available for encoding live events with RTMP input. + /// The outputs can be streamed using HLS or DASH formats. The outputs' archive or DVR rewind length is limited to 6 hours. + /// Use "LowLatency" stream option for all other scenarios. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag LowLatencyV2 = @"LowLatencyV2"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to StreamOptionsFlag + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StreamOptionsFlag(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StreamOptionsFlag + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type StreamOptionsFlag (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StreamOptionsFlag && Equals((StreamOptionsFlag)obj); + } + + /// Returns hashCode for enum StreamOptionsFlag + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private StreamOptionsFlag(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StreamOptionsFlag + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StreamOptionsFlag + /// the value to convert to an instance of . + + public static implicit operator StreamOptionsFlag(string value) + { + return new StreamOptionsFlag(value); + } + + /// Implicit operator to convert StreamOptionsFlag to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag e) + { + return e._value; + } + + /// Overriding != operator for enum StreamOptionsFlag + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StreamOptionsFlag + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamOptionsFlag e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/StreamingEndpointResourceState.cs b/swaggerci/mediaservices/generated/api/Support/StreamingEndpointResourceState.cs new file mode 100644 index 000000000000..5e03b2299fb9 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/StreamingEndpointResourceState.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The resource state of the streaming endpoint. + public partial struct StreamingEndpointResourceState : + System.IEquatable + { + /// The streaming endpoint is being deleted. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState Deleting = @"Deleting"; + + /// The streaming endpoint is running. It is able to stream content to clients + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState Running = @"Running"; + + /// The streaming endpoint is increasing or decreasing scale units. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState Scaling = @"Scaling"; + + /// The streaming endpoint is transitioning to the running state. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState Starting = @"Starting"; + + /// + /// The initial state of a streaming endpoint after creation. Content is not ready to be streamed from this endpoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState Stopped = @"Stopped"; + + /// The streaming endpoint is transitioning to the stopped state. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState Stopping = @"Stopping"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to StreamingEndpointResourceState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StreamingEndpointResourceState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StreamingEndpointResourceState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type StreamingEndpointResourceState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StreamingEndpointResourceState && Equals((StreamingEndpointResourceState)obj); + } + + /// Returns hashCode for enum StreamingEndpointResourceState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private StreamingEndpointResourceState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StreamingEndpointResourceState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StreamingEndpointResourceState + /// the value to convert to an instance of . + + public static implicit operator StreamingEndpointResourceState(string value) + { + return new StreamingEndpointResourceState(value); + } + + /// Implicit operator to convert StreamingEndpointResourceState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState e) + { + return e._value; + } + + /// Overriding != operator for enum StreamingEndpointResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StreamingEndpointResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingEndpointResourceState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/StreamingLocatorContentKeyType.cs b/swaggerci/mediaservices/generated/api/Support/StreamingLocatorContentKeyType.cs new file mode 100644 index 000000000000..749fe6389eaa --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/StreamingLocatorContentKeyType.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Encryption type of Content Key + public partial struct StreamingLocatorContentKeyType : + System.IEquatable + { + /// Common Encryption using CBCS + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType CommonEncryptionCbcs = @"CommonEncryptionCbcs"; + + /// Common Encryption using CENC + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType CommonEncryptionCenc = @"CommonEncryptionCenc"; + + /// Envelope Encryption + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType EnvelopeEncryption = @"EnvelopeEncryption"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to StreamingLocatorContentKeyType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StreamingLocatorContentKeyType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StreamingLocatorContentKeyType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type StreamingLocatorContentKeyType (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StreamingLocatorContentKeyType && Equals((StreamingLocatorContentKeyType)obj); + } + + /// Returns hashCode for enum StreamingLocatorContentKeyType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private StreamingLocatorContentKeyType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StreamingLocatorContentKeyType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StreamingLocatorContentKeyType + /// the value to convert to an instance of . + + public static implicit operator StreamingLocatorContentKeyType(string value) + { + return new StreamingLocatorContentKeyType(value); + } + + /// Implicit operator to convert StreamingLocatorContentKeyType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType e) + { + return e._value; + } + + /// Overriding != operator for enum StreamingLocatorContentKeyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StreamingLocatorContentKeyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingLocatorContentKeyType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/StreamingPolicyStreamingProtocol.cs b/swaggerci/mediaservices/generated/api/Support/StreamingPolicyStreamingProtocol.cs new file mode 100644 index 000000000000..2dec5de159b5 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/StreamingPolicyStreamingProtocol.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Streaming protocol + public partial struct StreamingPolicyStreamingProtocol : + System.IEquatable + { + /// DASH protocol + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol Dash = @"Dash"; + + /// Download protocol + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol Download = @"Download"; + + /// HLS protocol + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol Hls = @"Hls"; + + /// SmoothStreaming protocol + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol SmoothStreaming = @"SmoothStreaming"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to StreamingPolicyStreamingProtocol + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StreamingPolicyStreamingProtocol(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StreamingPolicyStreamingProtocol + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type StreamingPolicyStreamingProtocol (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StreamingPolicyStreamingProtocol && Equals((StreamingPolicyStreamingProtocol)obj); + } + + /// Returns hashCode for enum StreamingPolicyStreamingProtocol + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private StreamingPolicyStreamingProtocol(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StreamingPolicyStreamingProtocol + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StreamingPolicyStreamingProtocol + /// the value to convert to an instance of . + + public static implicit operator StreamingPolicyStreamingProtocol(string value) + { + return new StreamingPolicyStreamingProtocol(value); + } + + /// Implicit operator to convert StreamingPolicyStreamingProtocol to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol e) + { + return e._value; + } + + /// Overriding != operator for enum StreamingPolicyStreamingProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StreamingPolicyStreamingProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StreamingPolicyStreamingProtocol e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/StretchMode.cs b/swaggerci/mediaservices/generated/api/Support/StretchMode.cs new file mode 100644 index 000000000000..6cb36dc1b19e --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/StretchMode.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize + /// + public partial struct StretchMode : + System.IEquatable + { + /// + /// Pad the output (with either letterbox or pillar box) to honor the output resolution, while ensuring that the active video + /// region in the output has the same aspect ratio as the input. For example, if the input is 1920x1080 and the encoding preset + /// asks for 1280x1280, then the output will be at 1280x1280, which contains an inner rectangle of 1280x720 at aspect ratio + /// of 16:9, and pillar box regions 280 pixels wide at the left and right. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode AutoFit = @"AutoFit"; + + /// + /// Override the output resolution, and change it to match the display aspect ratio of the input, without padding. For example, + /// if the input is 1920x1080 and the encoding preset asks for 1280x1280, then the value in the preset is overridden, and + /// the output will be at 1280x720, which maintains the input aspect ratio of 16:9. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode AutoSize = @"AutoSize"; + + /// + /// Strictly respect the output resolution without considering the pixel aspect ratio or display aspect ratio of the input + /// video. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode None = @"None"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to StretchMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StretchMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StretchMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type StretchMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StretchMode && Equals((StretchMode)obj); + } + + /// Returns hashCode for enum StretchMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private StretchMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StretchMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StretchMode + /// the value to convert to an instance of . + + public static implicit operator StretchMode(string value) + { + return new StretchMode(value); + } + + /// Implicit operator to convert StretchMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode e) + { + return e._value; + } + + /// Overriding != operator for enum StretchMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StretchMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.StretchMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/TrackAttribute.cs b/swaggerci/mediaservices/generated/api/Support/TrackAttribute.cs new file mode 100644 index 000000000000..024945d1b6dd --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/TrackAttribute.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The TrackAttribute to filter the tracks by. + public partial struct TrackAttribute : + System.IEquatable + { + /// The bitrate of the track. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute Bitrate = @"Bitrate"; + + /// The language of the track. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute Language = @"Language"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to TrackAttribute + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new TrackAttribute(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type TrackAttribute + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type TrackAttribute (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is TrackAttribute && Equals((TrackAttribute)obj); + } + + /// Returns hashCode for enum TrackAttribute + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for TrackAttribute + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private TrackAttribute(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to TrackAttribute + /// the value to convert to an instance of . + + public static implicit operator TrackAttribute(string value) + { + return new TrackAttribute(value); + } + + /// Implicit operator to convert TrackAttribute to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute e) + { + return e._value; + } + + /// Overriding != operator for enum TrackAttribute + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum TrackAttribute + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackAttribute e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/TrackPropertyCompareOperation.cs b/swaggerci/mediaservices/generated/api/Support/TrackPropertyCompareOperation.cs new file mode 100644 index 000000000000..0acf09f11d6f --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/TrackPropertyCompareOperation.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Track property condition operation + public partial struct TrackPropertyCompareOperation : + System.IEquatable + { + /// Equal operation + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation Equal = @"Equal"; + + /// Unknown track property compare operation + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation Unknown = @"Unknown"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to TrackPropertyCompareOperation + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new TrackPropertyCompareOperation(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type TrackPropertyCompareOperation + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type TrackPropertyCompareOperation (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is TrackPropertyCompareOperation && Equals((TrackPropertyCompareOperation)obj); + } + + /// Returns hashCode for enum TrackPropertyCompareOperation + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for TrackPropertyCompareOperation + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private TrackPropertyCompareOperation(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to TrackPropertyCompareOperation + /// the value to convert to an instance of . + + public static implicit operator TrackPropertyCompareOperation(string value) + { + return new TrackPropertyCompareOperation(value); + } + + /// Implicit operator to convert TrackPropertyCompareOperation to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation e) + { + return e._value; + } + + /// Overriding != operator for enum TrackPropertyCompareOperation + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum TrackPropertyCompareOperation + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyCompareOperation e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/TrackPropertyType.cs b/swaggerci/mediaservices/generated/api/Support/TrackPropertyType.cs new file mode 100644 index 000000000000..b9e17667f4c0 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/TrackPropertyType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// Track property type + public partial struct TrackPropertyType : + System.IEquatable + { + /// Track FourCC + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType FourCc = @"FourCC"; + + /// Unknown track property + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType Unknown = @"Unknown"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to TrackPropertyType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new TrackPropertyType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type TrackPropertyType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type TrackPropertyType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is TrackPropertyType && Equals((TrackPropertyType)obj); + } + + /// Returns hashCode for enum TrackPropertyType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for TrackPropertyType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private TrackPropertyType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to TrackPropertyType + /// the value to convert to an instance of . + + public static implicit operator TrackPropertyType(string value) + { + return new TrackPropertyType(value); + } + + /// Implicit operator to convert TrackPropertyType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType e) + { + return e._value; + } + + /// Overriding != operator for enum TrackPropertyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum TrackPropertyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.TrackPropertyType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/VideoSyncMode.cs b/swaggerci/mediaservices/generated/api/Support/VideoSyncMode.cs new file mode 100644 index 000000000000..f0bf48ec7976 --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/VideoSyncMode.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// The Video Sync Mode + public partial struct VideoSyncMode : + System.IEquatable + { + /// + /// This is the default method. Chooses between Cfr and Vfr depending on muxer capabilities. For output format MP4, the default + /// mode is Cfr. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode Auto = @"Auto"; + + /// + /// Input frames will be repeated and/or dropped as needed to achieve exactly the requested constant frame rate. Recommended + /// when the output frame rate is explicitly set at a specified value + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode Cfr = @"Cfr"; + + /// + /// The presentation timestamps on frames are passed through from the input file to the output file writer. Recommended when + /// the input source has variable frame rate, and are attempting to produce multiple layers for adaptive streaming in the + /// output which have aligned GOP boundaries. Note: if two or more frames in the input have duplicate timestamps, then the + /// output will also have the same behavior + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode Passthrough = @"Passthrough"; + + /// + /// Similar to the Passthrough mode, but if the input has frames that have duplicate timestamps, then only one frame is passed + /// through to the output, and others are dropped. Recommended when the number of output frames is expected to be equal to + /// the number of input frames. For example, the output is used to calculate a quality metric like PSNR against the input + /// + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode Vfr = @"Vfr"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to VideoSyncMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new VideoSyncMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type VideoSyncMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type VideoSyncMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is VideoSyncMode && Equals((VideoSyncMode)obj); + } + + /// Returns hashCode for enum VideoSyncMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for VideoSyncMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private VideoSyncMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to VideoSyncMode + /// the value to convert to an instance of . + + public static implicit operator VideoSyncMode(string value) + { + return new VideoSyncMode(value); + } + + /// Implicit operator to convert VideoSyncMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode e) + { + return e._value; + } + + /// Overriding != operator for enum VideoSyncMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum VideoSyncMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.VideoSyncMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/api/Support/Visibility.cs b/swaggerci/mediaservices/generated/api/Support/Visibility.cs new file mode 100644 index 000000000000..78b8d977ea6b --- /dev/null +++ b/swaggerci/mediaservices/generated/api/Support/Visibility.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support +{ + + /// + /// 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". + /// + public partial struct Visibility : + System.IEquatable + { + /// The track is hidden to video player. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility Hidden = @"Hidden"; + + /// The track is visible to video player. + public static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility Visible = @"Visible"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Visibility + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Visibility(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Visibility + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Visibility (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Visibility && Equals((Visibility)obj); + } + + /// Returns hashCode for enum Visibility + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for Visibility + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Visibility(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to Visibility + /// the value to convert to an instance of . + + public static implicit operator Visibility(string value) + { + return new Visibility(value); + } + + /// Implicit operator to convert Visibility to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility e) + { + return e._value; + } + + /// Overriding != operator for enum Visibility + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Visibility + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility e1, Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Support.Visibility e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/CmdInfoHandler.cs b/swaggerci/mediaservices/generated/runtime/CmdInfoHandler.cs new file mode 100644 index 000000000000..2f98a694d356 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/CmdInfoHandler.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Management.Automation; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + using NextDelegate = Func, Task>, Task>; + using SignalDelegate = Func, Task>; + + public class CmdInfoHandler + { + private readonly string processRecordId; + private readonly string parameterSetName; + private readonly InvocationInfo invocationInfo; + + public CmdInfoHandler(string processRecordId, InvocationInfo invocationInfo, string parameterSetName) + { + this.processRecordId = processRecordId; + this.parameterSetName = parameterSetName; + this.invocationInfo = invocationInfo; + } + + public Task SendAsync(HttpRequestMessage request, CancellationToken token, Action cancel, SignalDelegate signal, NextDelegate next) + { + request.Headers.Add("x-ms-client-request-id", processRecordId); + request.Headers.Add("CommandName", invocationInfo?.InvocationName); + request.Headers.Add("FullCommandName", invocationInfo?.MyCommand?.Name); + request.Headers.Add("ParameterSetName", parameterSetName); + + // continue with pipeline. + return next(request, token, cancel, signal); + } + } +} diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/ConversionException.cs b/swaggerci/mediaservices/generated/runtime/Conversions/ConversionException.cs new file mode 100644 index 000000000000..d0567d860e60 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/ConversionException.cs @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal class ConversionException : Exception + { + internal ConversionException(string message) + : base(message) { } + + internal ConversionException(JsonNode node, Type targetType) + : base($"Cannot convert '{node.Type}' to a {targetType.Name}") { } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/IJsonConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/IJsonConverter.cs new file mode 100644 index 000000000000..b1db3f1c9353 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/IJsonConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal interface IJsonConverter + { + JsonNode ToJson(object value); + + object FromJson(JsonNode node); + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/BinaryConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/BinaryConverter.cs new file mode 100644 index 000000000000..f0f7961dc560 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/BinaryConverter.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class BinaryConverter : JsonConverter + { + internal override JsonNode ToJson(byte[] value) => new XBinary(value); + + internal override byte[] FromJson(JsonNode node) + { + switch (node.Type) + { + case JsonType.String : return Convert.FromBase64String(node.ToString()); // Base64 Encoded + case JsonType.Binary : return ((XBinary)node).Value; + } + + throw new ConversionException(node, typeof(byte[])); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/BooleanConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/BooleanConverter.cs new file mode 100644 index 000000000000..9df5f865a2e8 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/BooleanConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class BooleanConverter : JsonConverter + { + internal override JsonNode ToJson(bool value) => new JsonBoolean(value); + + internal override bool FromJson(JsonNode node) => (bool)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DateTimeConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DateTimeConverter.cs new file mode 100644 index 000000000000..81158d17a86a --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DateTimeConverter.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class DateTimeConverter : JsonConverter + { + internal override JsonNode ToJson(DateTime value) + { + return new JsonDate(value); + } + + internal override DateTime FromJson(JsonNode node) => (DateTime)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs new file mode 100644 index 000000000000..f42925204bcb --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class DateTimeOffsetConverter : JsonConverter + { + internal override JsonNode ToJson(DateTimeOffset value) => new JsonDate(value); + + internal override DateTimeOffset FromJson(JsonNode node) => (DateTimeOffset)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DecimalConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DecimalConverter.cs new file mode 100644 index 000000000000..afe6cc264a89 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DecimalConverter.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class DecimalConverter : JsonConverter + { + internal override JsonNode ToJson(decimal value) => new JsonNumber(value.ToString()); + + internal override decimal FromJson(JsonNode node) + { + return (decimal)node; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DoubleConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DoubleConverter.cs new file mode 100644 index 000000000000..f1f21f8fc88c --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/DoubleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class DoubleConverter : JsonConverter + { + internal override JsonNode ToJson(double value) => new JsonNumber(value); + + internal override double FromJson(JsonNode node) => (double)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/EnumConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/EnumConverter.cs new file mode 100644 index 000000000000..f81cd1775505 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/EnumConverter.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class EnumConverter : IJsonConverter + { + private readonly Type type; + + internal EnumConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + } + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + + public object FromJson(JsonNode node) + { + if (node.Type == JsonType.Number) + { + return Enum.ToObject(type, (int)node); + } + + return Enum.Parse(type, node.ToString(), ignoreCase: true); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/GuidConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/GuidConverter.cs new file mode 100644 index 000000000000..beea24a5d501 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/GuidConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class GuidConverter : JsonConverter + { + internal override JsonNode ToJson(Guid value) => new JsonString(value.ToString()); + + internal override Guid FromJson(JsonNode node) => (Guid)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/HashSet'1Converter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/HashSet'1Converter.cs new file mode 100644 index 000000000000..e992f46cd25b --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/HashSet'1Converter.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class HashSetConverter : JsonConverter> + { + internal override JsonNode ToJson(HashSet value) + { + return new XSet(value); + } + + internal override HashSet FromJson(JsonNode node) + { + var collection = node as ICollection; + + if (collection.Count == 0) return null; + + // TODO: Remove Linq depedency + return new HashSet(collection.Cast()); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int16Converter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int16Converter.cs new file mode 100644 index 000000000000..cc3910d8a4f3 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class Int16Converter : JsonConverter + { + internal override JsonNode ToJson(short value) => new JsonNumber(value); + + internal override short FromJson(JsonNode node) => (short)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int32Converter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int32Converter.cs new file mode 100644 index 000000000000..9032b10283ff --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class Int32Converter : JsonConverter + { + internal override JsonNode ToJson(int value) => new JsonNumber(value); + + internal override int FromJson(JsonNode node) => (int)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int64Converter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int64Converter.cs new file mode 100644 index 000000000000..d7e5615b0541 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/Int64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class Int64Converter : JsonConverter + { + internal override JsonNode ToJson(long value) => new JsonNumber(value); + + internal override long FromJson(JsonNode node) => (long)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/JsonArrayConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/JsonArrayConverter.cs new file mode 100644 index 000000000000..f6e99f1a795a --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/JsonArrayConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class JsonArrayConverter : JsonConverter + { + internal override JsonNode ToJson(JsonArray value) => value; + + internal override JsonArray FromJson(JsonNode node) => (JsonArray)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/JsonObjectConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/JsonObjectConverter.cs new file mode 100644 index 000000000000..f0141268faac --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/JsonObjectConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class JsonObjectConverter : JsonConverter + { + internal override JsonNode ToJson(JsonObject value) => value; + + internal override JsonObject FromJson(JsonNode node) => (JsonObject)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/SingleConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/SingleConverter.cs new file mode 100644 index 000000000000..294186d8db5c --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/SingleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class SingleConverter : JsonConverter + { + internal override JsonNode ToJson(float value) => new JsonNumber(value.ToString()); + + internal override float FromJson(JsonNode node) => (float)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/StringConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/StringConverter.cs new file mode 100644 index 000000000000..8f7cbc5f9f5f --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/StringConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class StringConverter : JsonConverter + { + internal override JsonNode ToJson(string value) => new JsonString(value); + + internal override string FromJson(JsonNode node) => node.ToString(); + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/TimeSpanConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/TimeSpanConverter.cs new file mode 100644 index 000000000000..21b43c64dfe4 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/TimeSpanConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class TimeSpanConverter : JsonConverter + { + internal override JsonNode ToJson(TimeSpan value) => new JsonString(value.ToString()); + + internal override TimeSpan FromJson(JsonNode node) => (TimeSpan)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt16Converter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt16Converter.cs new file mode 100644 index 000000000000..e2db1f7ed344 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class UInt16Converter : JsonConverter + { + internal override JsonNode ToJson(ushort value) => new JsonNumber(value); + + internal override ushort FromJson(JsonNode node) => (ushort)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt32Converter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt32Converter.cs new file mode 100644 index 000000000000..720be429410d --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class UInt32Converter : JsonConverter + { + internal override JsonNode ToJson(uint value) => new JsonNumber(value); + + internal override uint FromJson(JsonNode node) => (uint)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt64Converter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt64Converter.cs new file mode 100644 index 000000000000..e4eb027d3487 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UInt64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class UInt64Converter : JsonConverter + { + internal override JsonNode ToJson(ulong value) => new JsonNumber(value.ToString()); + + internal override ulong FromJson(JsonNode node) => (ulong)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UriConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UriConverter.cs new file mode 100644 index 000000000000..dcddff1f258f --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/Instances/UriConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class UriConverter : JsonConverter + { + internal override JsonNode ToJson(Uri value) => new JsonString(value.AbsoluteUri); + + internal override Uri FromJson(JsonNode node) => (Uri)node; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/JsonConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/JsonConverter.cs new file mode 100644 index 000000000000..5f11df7daffc --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/JsonConverter.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public abstract class JsonConverter : IJsonConverter + { + internal abstract T FromJson(JsonNode node); + + internal abstract JsonNode ToJson(T value); + + #region IConverter + + object IJsonConverter.FromJson(JsonNode node) => FromJson(node); + + JsonNode IJsonConverter.ToJson(object value) => ToJson((T)value); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/JsonConverterAttribute.cs b/swaggerci/mediaservices/generated/runtime/Conversions/JsonConverterAttribute.cs new file mode 100644 index 000000000000..1e8238262ec5 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/JsonConverterAttribute.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class JsonConverterAttribute : Attribute + { + internal JsonConverterAttribute(Type type) + { + Converter = (IJsonConverter)Activator.CreateInstance(type); + } + + internal IJsonConverter Converter { get; } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/JsonConverterFactory.cs b/swaggerci/mediaservices/generated/runtime/Conversions/JsonConverterFactory.cs new file mode 100644 index 000000000000..6a9934276998 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/JsonConverterFactory.cs @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class JsonConverterFactory + { + private static readonly Dictionary converters = new Dictionary(); + + static JsonConverterFactory() + { + AddInternal(new BooleanConverter()); + AddInternal(new DateTimeConverter()); + AddInternal(new DateTimeOffsetConverter()); + AddInternal(new BinaryConverter()); + AddInternal(new DecimalConverter()); + AddInternal(new DoubleConverter()); + AddInternal(new GuidConverter()); + AddInternal(new Int16Converter()); + AddInternal(new Int32Converter()); + AddInternal(new Int64Converter()); + AddInternal(new SingleConverter()); + AddInternal(new StringConverter()); + AddInternal(new TimeSpanConverter()); + AddInternal(new UInt16Converter()); + AddInternal(new UInt32Converter()); + AddInternal(new UInt64Converter()); + AddInternal(new UriConverter()); + + // Hash sets + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + + // JSON + + AddInternal(new JsonObjectConverter()); + AddInternal(new JsonArrayConverter()); + } + + internal static Dictionary Instances => converters; + + internal static IJsonConverter Get(Type type) + { + var details = TypeDetails.Get(type); + + if (details.JsonConverter == null) + { + throw new ConversionException($"No converter found for '{type.Name}'."); + } + + return details.JsonConverter; + } + + internal static bool TryGet(Type type, out IJsonConverter converter) + { + var typeDetails = TypeDetails.Get(type); + + converter = typeDetails.JsonConverter; + + return converter != null; + } + + private static void AddInternal(JsonConverter converter) + => converters.Add(typeof(T), converter); + + private static void AddInternal(IJsonConverter converter) + => converters.Add(typeof(T), converter); + + internal static void Add(JsonConverter converter) + { + if (converter == null) + { + throw new ArgumentNullException(nameof(converter)); + } + + AddInternal(converter); + + var type = TypeDetails.Get(); + + type.JsonConverter = converter; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Conversions/StringLikeConverter.cs b/swaggerci/mediaservices/generated/runtime/Conversions/StringLikeConverter.cs new file mode 100644 index 000000000000..742f0470b8ac --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Conversions/StringLikeConverter.cs @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class StringLikeConverter : IJsonConverter + { + private readonly Type type; + private readonly MethodInfo parseMethod; + + internal StringLikeConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + this.parseMethod = StringLikeHelper.GetParseMethod(type); + } + + public object FromJson(JsonNode node) => + parseMethod.Invoke(null, new[] { node.ToString() }); + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + } + + internal static class StringLikeHelper + { + private static readonly Type[] parseMethodParamaterTypes = new[] { typeof(string) }; + + internal static bool IsStringLike(Type type) + { + return GetParseMethod(type) != null; + } + + internal static MethodInfo GetParseMethod(Type type) + { + MethodInfo method = type.GetMethod("Parse", parseMethodParamaterTypes); + + if (method?.IsPublic != true) return null; + + return method; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Customizations/IJsonSerializable.cs b/swaggerci/mediaservices/generated/runtime/Customizations/IJsonSerializable.cs new file mode 100644 index 000000000000..c27e555e51e7 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Customizations/IJsonSerializable.cs @@ -0,0 +1,263 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json; +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + public interface IJsonSerializable + { + JsonNode ToJson(JsonObject container = null, SerializationMode serializationMode = SerializationMode.None); + } + internal static class JsonSerializable + { + /// + /// Serializes an enumerable and returns a JsonNode. + /// + /// an IEnumerable collection of items + /// A JsonNode that contains the collection of items serialized. + private static JsonNode ToJsonValue(System.Collections.IEnumerable enumerable) + { + if (enumerable != null) + { + // is it a byte array of some kind? + if (enumerable is System.Collections.Generic.IEnumerable byteEnumerable) + { + return new XBinary(System.Linq.Enumerable.ToArray(byteEnumerable)); + } + + var hasValues = false; + // just create an array of value nodes. + var result = new XNodeArray(); + foreach (var each in enumerable) + { + // we had at least one value. + hasValues = true; + + // try to serialize it. + var node = ToJsonValue(each); + if (null != node) + { + result.Add(node); + } + } + + // if we were able to add values, (or it was just empty), return it. + if (result.Count > 0 || !hasValues) + { + return result; + } + } + + // we couldn't serialize the values. Sorry. + return null; + } + + /// + /// Serializes a valuetype to a JsonNode. + /// + /// a ValueType (ie, a primitive, enum or struct) to be serialized + /// a JsonNode with the serialized value + private static JsonNode ToJsonValue(ValueType vValue) + { + // numeric type + if (vValue is SByte || vValue is Int16 || vValue is Int32 || vValue is Int64 || vValue is Byte || vValue is UInt16 || vValue is UInt32 || vValue is UInt64 || vValue is decimal || vValue is float || vValue is double) + { + return new JsonNumber(vValue.ToString()); + } + + // boolean type + if (vValue is bool bValue) + { + return new JsonBoolean(bValue); + } + + // dates + if (vValue is DateTime dtValue) + { + return new JsonDate(dtValue); + } + + // DictionaryEntity struct type + if (vValue is System.Collections.DictionaryEntry deValue) + { + return new JsonObject { { deValue.Key.ToString(), ToJsonValue(deValue.Value) } }; + } + + // sorry, no idea. + return null; + } + /// + /// Attempts to serialize an object by using ToJson() or ToJsonString() if they exist. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + private static JsonNode TryToJsonValue(dynamic oValue) + { + object jsonValue = null; + dynamic v = oValue; + try + { + jsonValue = v.ToJson().ToString(); + } + catch + { + // no harm... + try + { + jsonValue = v.ToJsonString().ToString(); + } + catch + { + // no worries here either. + } + } + + // if we got something out, let's use it. + if (null != jsonValue) + { + // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? + return new JsonNumber(jsonValue.ToString()); + } + + return null; + } + + /// + /// Serialize an object by using a variety of methods. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + internal static JsonNode ToJsonValue(object value) + { + // things that implement our interface are preferred. + if (value is Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IJsonSerializable jsonSerializable) + { + return jsonSerializable.ToJson(); + } + + // strings are easy. + if (value is string || value is char) + { + return new JsonString(value.ToString()); + } + + // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) + if (value is System.ValueType vValue) + { + return ToJsonValue(vValue) ?? TryToJsonValue(vValue) ?? new JsonString(vValue.ToString()); + } + + // dictionaries are objects that should be able to serialize + if (value is System.Collections.Generic.IDictionary dictionary) + { + return Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.ToJson(dictionary, null); + } + + // hashtables are converted to dictionaries for serialization + if (value is System.Collections.Hashtable hashtable) + { + var dict = new System.Collections.Generic.Dictionary(); + DictionaryExtensions.HashTableToDictionary(hashtable, dict); + return Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.ToJson(dict, null); + } + + // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) + if (value is System.Collections.IEnumerable enumerableValue) + { + // some kind of enumerable value + return ToJsonValue(enumerableValue) ?? TryToJsonValue(value) ?? new JsonString(value.ToString()); + } + + // at this point, we're going to fallback to a string literal here, since we really have no idea what it is. + return new JsonString(value.ToString()); + } + + internal static JsonObject ToJson(System.Collections.Generic.Dictionary dictionary, JsonObject container) => ToJson((System.Collections.Generic.IDictionary)dictionary, container); + + /// + /// Serializes a dictionary into a JsonObject container. + /// + /// The dictionary to serailize + /// the container to serialize the dictionary into + /// the container + internal static JsonObject ToJson(System.Collections.Generic.IDictionary dictionary, JsonObject container) + { + container = container ?? new JsonObject(); + if (dictionary != null && dictionary.Count > 0) + { + foreach (var key in dictionary) + { + // currently, we don't serialize null values. + if (null != key.Value) + { + container.Add(key.Key, ToJsonValue(key.Value)); + continue; + } + } + } + return container; + } + + internal static Func> DeserializeDictionary(Func> dictionaryFactory) + { + return (node) => FromJson(node, dictionaryFactory(), (object)(DeserializeDictionary(dictionaryFactory)) as Func); + } + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.Dictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) => FromJson(json, (System.Collections.Generic.IDictionary)container, objectFactory, excludes); + + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.IDictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) + { + if (null == json) + { + return container; + } + + foreach (var key in json.Keys) + { + if (true == excludes?.Contains(key)) + { + continue; + } + + var value = json[key]; + try + { + switch (value.Type) + { + case JsonType.Null: + // skip null values. + continue; + + case JsonType.Array: + case JsonType.Boolean: + case JsonType.Date: + case JsonType.Binary: + case JsonType.Number: + case JsonType.String: + container.Add(key, (V)value.ToValue()); + break; + case JsonType.Object: + if (objectFactory != null) + { + var v = objectFactory(value as JsonObject); + if (null != v) + { + container.Add(key, v); + } + } + break; + } + } + catch + { + } + } + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Customizations/JsonArray.cs b/swaggerci/mediaservices/generated/runtime/Customizations/JsonArray.cs new file mode 100644 index 000000000000..ca55703ef850 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Customizations/JsonArray.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public partial class JsonArray + { + internal override object ToValue() => Count == 0 ? new object[0] : System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(this, each => each.ToValue())); + } + + +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Customizations/JsonBoolean.cs b/swaggerci/mediaservices/generated/runtime/Customizations/JsonBoolean.cs new file mode 100644 index 000000000000..2d4613a869ec --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Customizations/JsonBoolean.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal partial class JsonBoolean + { + internal static JsonBoolean Create(bool? value) => value is bool b ? new JsonBoolean(b) : null; + internal bool ToBoolean() => Value; + + internal override object ToValue() => Value; + } + + +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Customizations/JsonNode.cs b/swaggerci/mediaservices/generated/runtime/Customizations/JsonNode.cs new file mode 100644 index 000000000000..b598da8087ac --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Customizations/JsonNode.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonNode + { + /// + /// Returns the content of this node as the underlying value. + /// Will default to the string representation if not overridden in child classes. + /// + /// an object with the underlying value of the node. + internal virtual object ToValue() { + return this.ToString(); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Customizations/JsonNumber.cs b/swaggerci/mediaservices/generated/runtime/Customizations/JsonNumber.cs new file mode 100644 index 000000000000..4f82ea2cc0b6 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Customizations/JsonNumber.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + using System; + + public partial class JsonNumber + { + internal static readonly DateTime EpochDate = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + private static long ToUnixTime(DateTime dateTime) + { + return (long)dateTime.Subtract(EpochDate).TotalSeconds; + } + private static DateTime FromUnixTime(long totalSeconds) + { + return EpochDate.AddSeconds(totalSeconds); + } + internal byte ToByte() => this; + internal int ToInt() => this; + internal long ToLong() => this; + internal short ToShort() => this; + internal UInt16 ToUInt16() => this; + internal UInt32 ToUInt32() => this; + internal UInt64 ToUInt64() => this; + internal decimal ToDecimal() => this; + internal double ToDouble() => this; + internal float ToFloat() => this; + + internal static JsonNumber Create(int? value) => value is int n ? new JsonNumber(n) : null; + internal static JsonNumber Create(long? value) => value is long n ? new JsonNumber(n) : null; + internal static JsonNumber Create(float? value) => value is float n ? new JsonNumber(n) : null; + internal static JsonNumber Create(double? value) => value is double n ? new JsonNumber(n) : null; + internal static JsonNumber Create(decimal? value) => value is decimal n ? new JsonNumber(n) : null; + internal static JsonNumber Create(DateTime? value) => value is DateTime date ? new JsonNumber(ToUnixTime(date)) : null; + + public static implicit operator DateTime(JsonNumber number) => FromUnixTime(number); + internal DateTime ToDateTime() => this; + + internal JsonNumber(decimal value) + { + this.value = value.ToString(); + } + internal override object ToValue() + { + if (IsInteger) + { + if (int.TryParse(this.value, out int iValue)) + { + return iValue; + } + if (long.TryParse(this.value, out long lValue)) + { + return lValue; + } + } + else + { + if (float.TryParse(this.value, out float fValue)) + { + return fValue; + } + if (double.TryParse(this.value, out double dValue)) + { + return dValue; + } + if (decimal.TryParse(this.value, out decimal dcValue)) + { + return dcValue; + } + } + return null; + } + } + + +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Customizations/JsonObject.cs b/swaggerci/mediaservices/generated/runtime/Customizations/JsonObject.cs new file mode 100644 index 000000000000..cd220f17e932 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Customizations/JsonObject.cs @@ -0,0 +1,183 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonObject + { + internal override object ToValue() => Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.JsonSerializable.FromJson(this, new System.Collections.Generic.Dictionary(), (obj) => obj.ToValue()); + + internal void SafeAdd(string name, Func valueFn) + { + if (valueFn != null) + { + var value = valueFn(); + if (null != value) + { + items.Add(name, value); + } + } + } + + internal void SafeAdd(string name, JsonNode value) + { + if (null != value) + { + items.Add(name, value); + } + } + + internal T NullableProperty(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; + } + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + //throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal JsonObject Property(string propertyName) + { + return PropertyT(propertyName); + } + + internal T PropertyT(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; // we're going to assume that the consumer knows what to do if null is explicity returned? + } + + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + // throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal int NumberProperty(string propertyName, ref int output) => output = this.PropertyT(propertyName)?.ToInt() ?? output; + internal float NumberProperty(string propertyName, ref float output) => output = this.PropertyT(propertyName)?.ToFloat() ?? output; + internal byte NumberProperty(string propertyName, ref byte output) => output = this.PropertyT(propertyName)?.ToByte() ?? output; + internal long NumberProperty(string propertyName, ref long output) => output = this.PropertyT(propertyName)?.ToLong() ?? output; + internal double NumberProperty(string propertyName, ref double output) => output = this.PropertyT(propertyName)?.ToDouble() ?? output; + internal decimal NumberProperty(string propertyName, ref decimal output) => output = this.PropertyT(propertyName)?.ToDecimal() ?? output; + internal short NumberProperty(string propertyName, ref short output) => output = this.PropertyT(propertyName)?.ToShort() ?? output; + internal DateTime NumberProperty(string propertyName, ref DateTime output) => output = this.PropertyT(propertyName)?.ToDateTime() ?? output; + + internal int? NumberProperty(string propertyName, ref int? output) => output = this.NullableProperty(propertyName)?.ToInt() ?? null; + internal float? NumberProperty(string propertyName, ref float? output) => output = this.NullableProperty(propertyName)?.ToFloat() ?? null; + internal byte? NumberProperty(string propertyName, ref byte? output) => output = this.NullableProperty(propertyName)?.ToByte() ?? null; + internal long? NumberProperty(string propertyName, ref long? output) => output = this.NullableProperty(propertyName)?.ToLong() ?? null; + internal double? NumberProperty(string propertyName, ref double? output) => output = this.NullableProperty(propertyName)?.ToDouble() ?? null; + internal decimal? NumberProperty(string propertyName, ref decimal? output) => output = this.NullableProperty(propertyName)?.ToDecimal() ?? null; + internal short? NumberProperty(string propertyName, ref short? output) => output = this.NullableProperty(propertyName)?.ToShort() ?? null; + + internal DateTime? NumberProperty(string propertyName, ref DateTime? output) => output = this.NullableProperty(propertyName)?.ToDateTime() ?? null; + + + internal string StringProperty(string propertyName) => this.PropertyT(propertyName)?.ToString(); + internal string StringProperty(string propertyName, ref string output) => output = this.PropertyT(propertyName)?.ToString() ?? output; + internal char StringProperty(string propertyName, ref char output) => output = this.PropertyT(propertyName)?.ToChar() ?? output; + internal char? StringProperty(string propertyName, ref char? output) => output = this.PropertyT(propertyName)?.ToChar() ?? null; + + internal DateTime StringProperty(string propertyName, ref DateTime output) => DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out output) ? output : output; + internal DateTime? StringProperty(string propertyName, ref DateTime? output) => output = DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out var o) ? o : output; + + + internal bool BooleanProperty(string propertyName, ref bool output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? output; + internal bool? BooleanProperty(string propertyName, ref bool? output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? null; + + internal T[] ArrayProperty(string propertyName, ref T[] output, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + } + return output; + } + internal T[] ArrayProperty(string propertyName, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + var output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + return output; + } + return new T[0]; + } + internal void IterateArrayProperty(string propertyName, Action deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + for (var i = 0; i < array.Count; i++) + { + deserializer(array[i]); + } + } + } + + internal Dictionary DictionaryProperty(string propertyName, ref Dictionary output, Func deserializer) + { + var dictionary = this.PropertyT(propertyName); + if (output == null) + { + output = new Dictionary(); + } + else + { + output.Clear(); + } + if (dictionary != null) + { + foreach (var key in dictionary.Keys) + { + output[key] = deserializer(dictionary[key]); + } + } + return output; + } + + internal static JsonObject Create(IDictionary source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new JsonObject(); + + foreach (var key in source.Keys) + { + result.SafeAdd(key, selector(source[key])); + } + return result; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Customizations/JsonString.cs b/swaggerci/mediaservices/generated/runtime/Customizations/JsonString.cs new file mode 100644 index 000000000000..70d2ea584d16 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Customizations/JsonString.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + using System; + using System.Globalization; + using System.Linq; + + public partial class JsonString + { + internal static string DateFormat = "yyyy-MM-dd"; + internal static string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; + internal static string DateTimeRfc1123Format = "R"; + + internal static JsonString Create(string value) => value == null ? null : new JsonString(value); + internal static JsonString Create(char? value) => value is char c ? new JsonString(c.ToString()) : null; + + internal static JsonString CreateDate(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTime(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTimeRfc1123(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeRfc1123Format, CultureInfo.CurrentCulture)) : null; + + internal char ToChar() => this.Value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char(JsonString value) => value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char? (JsonString value) => value?.ToString()?.FirstOrDefault(); + + public static implicit operator DateTime(JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime); + public static implicit operator DateTime? (JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime?); + + } + + +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Customizations/XNodeArray.cs b/swaggerci/mediaservices/generated/runtime/Customizations/XNodeArray.cs new file mode 100644 index 000000000000..e6fcd8d3ed6e --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Customizations/XNodeArray.cs @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + using System; + using System.Linq; + + public partial class XNodeArray + { + internal static XNodeArray Create(T[] source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new XNodeArray(); + foreach (var item in source.Select(selector)) + { + result.SafeAdd(item); + } + return result; + } + internal void SafeAdd(JsonNode item) + { + if (item != null) + { + items.Add(item); + } + } + internal void SafeAdd(Func itemFn) + { + if (itemFn != null) + { + var item = itemFn(); + if (item != null) + { + items.Add(item); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/EventData.cs b/swaggerci/mediaservices/generated/runtime/EventData.cs new file mode 100644 index 000000000000..a6039768ddd0 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/EventData.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + + using System; + using System.Threading; + + ///Represents the data in signaled event. + public partial class EventData + { + /// + /// The type of the event being signaled + /// + public string Id; + + /// + /// The user-ready message from the event. + /// + public string Message; + + /// + /// When the event is about a parameter, this is the parameter name. + /// Used in Validation Events + /// + public string Parameter; + + /// + /// This represents a numeric value associated with the event. + /// Use for progress-style events + /// + public double Value; + + /// + /// Any extended data for an event should be serialized and stored here. + /// + public string ExtendedData; + + /// + /// If the event triggers after the request message has been created, this will contain the Request Message (which in HTTP calls would be HttpRequestMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.RequestMessgae is HttpRequestMessage httpRequest) + /// { + /// httpRequest.Headers.Add("x-request-flavor", "vanilla"); + /// } + /// + /// + public object RequestMessage; + + /// + /// If the event triggers after the response is back, this will contain the Response Message (which in HTTP calls would be HttpResponseMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.ResponseMessage is HttpResponseMessage httpResponse){ + /// var flavor = httpResponse.Headers.GetValue("x-request-flavor"); + /// } + /// + /// + public object ResponseMessage; + + /// + /// Cancellation method for this event. + /// + /// If the event consumer wishes to cancel the request that initiated this event, call Cancel() + /// + /// + /// The original initiator of the request must provide the implementation of this. + /// + public System.Action Cancel; + } + +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/EventListener.cs b/swaggerci/mediaservices/generated/runtime/EventListener.cs new file mode 100644 index 000000000000..8354f1ab7ff4 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/EventListener.cs @@ -0,0 +1,247 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public interface IValidates + { + Task Validate(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IEventListener listener); + } + + /// + /// The IEventListener Interface defines the communication mechanism for Signaling events during a remote call. + /// + /// + /// The interface is designed to be as minimal as possible, allow for quick peeking of the event type (id) + /// and the cancellation status and provides a delegate for retrieving the event details themselves. + /// + public interface IEventListener + { + Task Signal(string id, CancellationToken token, GetEventData createMessage); + CancellationToken Token { get; } + System.Action Cancel { get; } + } + + internal static partial class Extensions + { + public static Task Signal(this IEventListener instance, string id, CancellationToken token, Func createMessage) => instance.Signal(id, token, createMessage); + public static Task Signal(this IEventListener instance, string id, CancellationToken token) => instance.Signal(id, token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, EventData message) => instance.Signal(id, token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, Func createMessage) => instance.Signal(id, instance.Token, createMessage); + public static Task Signal(this IEventListener instance, string id) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, EventData message) => instance.Signal(id, instance.Token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, System.Uri uri) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = uri.ToString(), Cancel = instance.Cancel }); + + public static async Task AssertNotNull(this IEventListener instance, string parameterName, object value) + { + if (value == null) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' should not be null", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMinimumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length < length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is less than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMaximumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length > length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is greater than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + + public static async Task AssertRegEx(this IEventListener instance, string parameterName, string value, string regularExpression) + { + if (value != null && !System.Text.RegularExpressions.Regex.Match(value, regularExpression).Success) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' does not validate against pattern /{regularExpression}/", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertEnum(this IEventListener instance, string parameterName, string value, params string[] values) + { + if (!values.Any(each => each.Equals(value))) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' is not one of ({values.Aggregate((c, e) => $"'{e}',{c}")}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertObjectIsValid(this IEventListener instance, string parameterName, object inst) + { + await (inst as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.IValidates)?.Validate(instance); + } + + public static async Task AssertIsLessThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) >= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) <= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsLessThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) > 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) < 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, Int64? value, Int64 multiple) + { + if (null != value && value % multiple != 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, double? value, double multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, decimal? value, decimal multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + } + + /// + /// An Implementation of the IEventListener that supports subscribing to events and dispatching them + /// (used for manually using the lowlevel interface) + /// + public class EventListener : CancellationTokenSource, IEnumerable>, IEventListener + { + private Dictionary calls = new Dictionary(); + public IEnumerator> GetEnumerator() => calls.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => calls.GetEnumerator(); + public EventListener() + { + } + + public new Action Cancel => base.Cancel; + private Event tracer; + + public EventListener(params (string name, Event callback)[] initializer) + { + foreach (var each in initializer) + { + Add(each.name, each.callback); + } + } + + public void Add(string name, SynchEvent callback) + { + Add(name, (message) => { callback(message); return Task.CompletedTask; }); + } + + public void Add(string name, Event callback) + { + if (callback != null) + { + if (string.IsNullOrEmpty(name)) + { + if (calls.ContainsKey(name)) + { + tracer += callback; + } + else + { + tracer = callback; + } + } + else + { + if (calls.ContainsKey(name)) + { + calls[name ?? System.String.Empty] += callback; + } + else + { + calls[name ?? System.String.Empty] = callback; + } + } + } + } + + + public async Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + using (NoSynchronizationContext) + { + if (!string.IsNullOrEmpty(id) && (calls.TryGetValue(id, out Event listener) || tracer != null)) + { + var message = createMessage(); + message.Id = id; + + await listener?.Invoke(message); + await tracer?.Invoke(message); + + if (token.IsCancellationRequested) + { + throw new OperationCanceledException($"Canceled by event {id} ", this.Token); + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Events.cs b/swaggerci/mediaservices/generated/runtime/Events.cs new file mode 100644 index 000000000000..9638aca3ad09 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Events.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + public static partial class Events + { + public const string Log = nameof(Log); + public const string Validation = nameof(Validation); + public const string ValidationWarning = nameof(ValidationWarning); + public const string AfterValidation = nameof(AfterValidation); + public const string RequestCreated = nameof(RequestCreated); + public const string ResponseCreated = nameof(ResponseCreated); + public const string URLCreated = nameof(URLCreated); + public const string Finally = nameof(Finally); + public const string HeaderParametersAdded = nameof(HeaderParametersAdded); + public const string BodyContentSet = nameof(BodyContentSet); + public const string BeforeCall = nameof(BeforeCall); + public const string BeforeResponseDispatch = nameof(BeforeResponseDispatch); + public const string FollowingNextLink = nameof(FollowingNextLink); + public const string DelayBeforePolling = nameof(DelayBeforePolling); + public const string Polling = nameof(Polling); + + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Extensions.cs b/swaggerci/mediaservices/generated/runtime/Extensions.cs new file mode 100644 index 000000000000..65e520697fbc --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Extensions.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + using System.Linq; + using System; + + internal static partial class Extensions + { + public static T[] SubArray(this T[] array, int offset, int length) + { + return new ArraySegment(array, offset, length) + .ToArray(); + } + + public static T ReadHeaders(this T instance, global::System.Net.Http.Headers.HttpResponseHeaders headers) where T : class + { + (instance as IHeaderSerializable)?.ReadHeaders(headers); + return instance; + } + + internal static bool If(T input, out T output) + { + if (null == input) + { + output = default(T); + return false; + } + output = input; + return true; + } + + internal static void AddIf(T value, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(value); + } + } + + internal static void AddIf(T value, string serializedName, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(serializedName, value); + } + } + + /// + /// Returns the first header value as a string from an HttpReponseMessage. + /// + /// the HttpResponseMessage to fetch a header from + /// the header name + /// the first header value as a string from an HttpReponseMessage. string.empty if there is no header value matching + internal static string GetFirstHeader(this System.Net.Http.HttpResponseMessage response, string headerName) => response.Headers.FirstOrDefault(each => string.Equals(headerName, each.Key, System.StringComparison.OrdinalIgnoreCase)).Value?.FirstOrDefault() ?? string.Empty; + + /// + /// Sets the Synchronization Context to null, and returns an IDisposable that when disposed, + /// will restore the synchonization context to the original value. + /// + /// This is used a less-invasive means to ensure that code in the library that doesn't + /// need to be continued in the original context doesn't have to have ConfigureAwait(false) + /// on every single await + /// + /// If the SynchronizationContext is null when this is used, the resulting IDisposable + /// will not do anything (this prevents excessive re-setting of the SynchronizationContext) + /// + /// Usage: + /// + /// using(NoSynchronizationContext) { + /// await SomeAsyncOperation(); + /// await SomeOtherOperation(); + /// } + /// + /// + /// + /// An IDisposable that will return the SynchronizationContext to original state + internal static System.IDisposable NoSynchronizationContext => System.Threading.SynchronizationContext.Current == null ? Dummy : new NoSyncContext(); + + /// + /// An instance of the Dummy IDispoable. + /// + /// + internal static System.IDisposable Dummy = new DummyDisposable(); + + /// + /// An IDisposable that does absolutely nothing. + /// + internal class DummyDisposable : System.IDisposable + { + public void Dispose() + { + } + } + /// + /// An IDisposable that saves the SynchronizationContext,sets it to null and + /// restores it to the original upon Dispose(). + /// + /// NOTE: This is designed to be less invasive than using .ConfigureAwait(false) + /// on every single await in library code (ie, places where we know we don't need + /// to continue in the same context as we went async) + /// + internal class NoSyncContext : System.IDisposable + { + private System.Threading.SynchronizationContext original = System.Threading.SynchronizationContext.Current; + internal NoSyncContext() + { + System.Threading.SynchronizationContext.SetSynchronizationContext(null); + } + public void Dispose() => System.Threading.SynchronizationContext.SetSynchronizationContext(original); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs b/swaggerci/mediaservices/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs new file mode 100644 index 000000000000..2f36ab1fd923 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal static class StringBuilderExtensions + { + /// + /// Extracts the buffered value and resets the buffer + /// + internal static string Extract(this StringBuilder builder) + { + var text = builder.ToString(); + + builder.Clear(); + + return text; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Helpers/Extensions/TypeExtensions.cs b/swaggerci/mediaservices/generated/runtime/Helpers/Extensions/TypeExtensions.cs new file mode 100644 index 000000000000..bd43e9a28e97 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Helpers/Extensions/TypeExtensions.cs @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal static class TypeExtensions + { + internal static bool IsNullable(this Type type) => + type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable<>)); + + internal static Type GetOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition() == openGenericInterfaceType) + { + return candidateType; + } + + // Check if it references it's own converter.... + + foreach (Type interfaceType in candidateType.GetInterfaces()) + { + if (interfaceType.IsGenericType + && interfaceType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return interfaceType; + } + } + + return null; + } + + // Author: Sebastian Good + // http://stackoverflow.com/questions/503263/how-to-determine-if-a-type-implements-a-specific-generic-interface-type + internal static bool ImplementsOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + if (candidateType.Equals(openGenericInterfaceType)) + { + return true; + } + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return true; + } + + foreach (Type i in candidateType.GetInterfaces()) + { + if (i.IsGenericType && i.ImplementsOpenGenericInterface(openGenericInterfaceType)) + { + return true; + } + } + + return false; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Helpers/Seperator.cs b/swaggerci/mediaservices/generated/runtime/Helpers/Seperator.cs new file mode 100644 index 000000000000..337529f7ea2c --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Helpers/Seperator.cs @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal static class Seperator + { + internal static readonly char[] Dash = { '-' }; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Helpers/TypeDetails.cs b/swaggerci/mediaservices/generated/runtime/Helpers/TypeDetails.cs new file mode 100644 index 000000000000..daa9af4b19a8 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Helpers/TypeDetails.cs @@ -0,0 +1,116 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + + + + internal class TypeDetails + { + private readonly Type info; + + internal TypeDetails(Type info) + { + this.info = info ?? throw new ArgumentNullException(nameof(info)); + } + + internal Type NonNullType { get; set; } + + internal object DefaultValue { get; set; } + + internal bool IsNullable { get; set; } + + internal bool IsList { get; set; } + + internal bool IsStringLike { get; set; } + + internal bool IsEnum => info.IsEnum; + + internal bool IsArray => info.IsArray; + + internal bool IsValueType => info.IsValueType; + + internal Type ElementType { get; set; } + + internal IJsonConverter JsonConverter { get; set; } + + #region Creation + + private static readonly ConcurrentDictionary cache = new ConcurrentDictionary(); + + internal static TypeDetails Get() => Get(typeof(T)); + + internal static TypeDetails Get(Type type) => cache.GetOrAdd(type, Create); + + private static TypeDetails Create(Type type) + { + var isGenericList = !type.IsPrimitive && type.ImplementsOpenGenericInterface(typeof(IList<>)); + var isList = !type.IsPrimitive && (isGenericList || typeof(IList).IsAssignableFrom(type)); + + var isNullable = type.IsNullable(); + + Type elementType; + + if (type.IsArray) + { + elementType = type.GetElementType(); + } + else if (isGenericList) + { + var iList = type.GetOpenGenericInterface(typeof(IList<>)); + + elementType = iList.GetGenericArguments()[0]; + } + else + { + elementType = null; + } + + var nonNullType = isNullable ? type.GetGenericArguments()[0] : type; + + var isStringLike = false; + + IJsonConverter converter; + + var jsonConverterAttribute = type.GetCustomAttribute(); + + if (jsonConverterAttribute != null) + { + converter = jsonConverterAttribute.Converter; + } + else if (nonNullType.IsEnum) + { + converter = new EnumConverter(nonNullType); + } + else if (JsonConverterFactory.Instances.TryGetValue(nonNullType, out converter)) + { + } + else if (StringLikeHelper.IsStringLike(nonNullType)) + { + isStringLike = true; + + converter = new StringLikeConverter(nonNullType); + } + + return new TypeDetails(nonNullType) { + NonNullType = nonNullType, + DefaultValue = type.IsValueType ? Activator.CreateInstance(type) : null, + IsNullable = isNullable, + IsList = isList, + IsStringLike = isStringLike, + ElementType = elementType, + JsonConverter = converter + }; + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Helpers/XHelper.cs b/swaggerci/mediaservices/generated/runtime/Helpers/XHelper.cs new file mode 100644 index 000000000000..c3a464bb2a09 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Helpers/XHelper.cs @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal static class XHelper + { + internal static JsonNode Create(JsonType type, TypeCode code, object value) + { + switch (type) + { + case JsonType.Binary : return new XBinary((byte[])value); + case JsonType.Boolean : return new JsonBoolean((bool)value); + case JsonType.Number : return new JsonNumber(value.ToString()); + case JsonType.String : return new JsonString((string)value); + } + + throw new Exception($"JsonType '{type}' does not have a fast conversion"); + } + + internal static bool TryGetElementType(TypeCode code, out JsonType type) + { + switch (code) + { + case TypeCode.Boolean : type = JsonType.Boolean; return true; + case TypeCode.Byte : type = JsonType.Number; return true; + case TypeCode.DateTime : type = JsonType.Date; return true; + case TypeCode.Decimal : type = JsonType.Number; return true; + case TypeCode.Double : type = JsonType.Number; return true; + case TypeCode.Empty : type = JsonType.Null; return true; + case TypeCode.Int16 : type = JsonType.Number; return true; + case TypeCode.Int32 : type = JsonType.Number; return true; + case TypeCode.Int64 : type = JsonType.Number; return true; + case TypeCode.SByte : type = JsonType.Number; return true; + case TypeCode.Single : type = JsonType.Number; return true; + case TypeCode.String : type = JsonType.String; return true; + case TypeCode.UInt16 : type = JsonType.Number; return true; + case TypeCode.UInt32 : type = JsonType.Number; return true; + case TypeCode.UInt64 : type = JsonType.Number; return true; + } + + type = default; + + return false; + } + + internal static JsonType GetElementType(TypeCode code) + { + switch (code) + { + case TypeCode.Boolean : return JsonType.Boolean; + case TypeCode.Byte : return JsonType.Number; + case TypeCode.DateTime : return JsonType.Date; + case TypeCode.Decimal : return JsonType.Number; + case TypeCode.Double : return JsonType.Number; + case TypeCode.Empty : return JsonType.Null; + case TypeCode.Int16 : return JsonType.Number; + case TypeCode.Int32 : return JsonType.Number; + case TypeCode.Int64 : return JsonType.Number; + case TypeCode.SByte : return JsonType.Number; + case TypeCode.Single : return JsonType.Number; + case TypeCode.String : return JsonType.String; + case TypeCode.UInt16 : return JsonType.Number; + case TypeCode.UInt32 : return JsonType.Number; + case TypeCode.UInt64 : return JsonType.Number; + default : return JsonType.Object; + } + + throw new Exception($"TypeCode '{code}' does not have a fast converter"); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/IAssociativeArray.cs b/swaggerci/mediaservices/generated/runtime/IAssociativeArray.cs new file mode 100644 index 000000000000..936fa92c8b7b --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/IAssociativeArray.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +#define DICT_PROPERTIES +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + /// A subset of IDictionary that doesn't implement IEnumerable or IDictionary to work around PowerShell's aggressive formatter + public interface IAssociativeArray + { +#if DICT_PROPERTIES + System.Collections.Generic.IEnumerable Keys { get; } + System.Collections.Generic.IEnumerable Values { get; } + int Count { get; } +#endif + System.Collections.Generic.IDictionary AdditionalProperties { get; } + T this[string index] { get; set; } + void Add(string key, T value); + bool ContainsKey(string key); + bool Remove(string key); + bool TryGetValue(string key, out T value); + void Clear(); + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/IHeaderSerializable.cs b/swaggerci/mediaservices/generated/runtime/IHeaderSerializable.cs new file mode 100644 index 000000000000..91eab97d243a --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/IHeaderSerializable.cs @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + public interface IHeaderSerializable + { + void ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers); + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/ISendAsync.cs b/swaggerci/mediaservices/generated/runtime/ISendAsync.cs new file mode 100644 index 000000000000..a04a955e4a4f --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/ISendAsync.cs @@ -0,0 +1,300 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + + /// + /// The interface for sending an HTTP request across the wire. + /// + public interface ISendAsync + { + Task SendAsync(HttpRequestMessage request, IEventListener callback); + } + + public class SendAsyncTerminalFactory : ISendAsyncTerminalFactory, ISendAsync + { + SendAsync implementation; + + public SendAsyncTerminalFactory(SendAsync implementation) => this.implementation = implementation; + public SendAsyncTerminalFactory(ISendAsync implementation) => this.implementation = implementation.SendAsync; + public ISendAsync Create() => this; + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback); + } + + public partial class SendAsyncFactory : ISendAsyncFactory + { + public class Sender : ISendAsync + { + internal ISendAsync next; + internal SendAsyncStep implementation; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback, next); + } + SendAsyncStep implementation; + + public SendAsyncFactory(SendAsyncStep implementation) => this.implementation = implementation; + public ISendAsync Create(ISendAsync next) => new Sender { next = next, implementation = implementation }; + + } + + public class HttpClientFactory : ISendAsyncTerminalFactory, ISendAsync + { + HttpClient client; + public HttpClientFactory() : this(new HttpClient()) + { + } + public HttpClientFactory(HttpClient client) => this.client = client; + public ISendAsync Create() => this; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, callback.Token); + } + + public interface ISendAsyncFactory + { + ISendAsync Create(ISendAsync next); + } + + public interface ISendAsyncTerminalFactory + { + ISendAsync Create(); + } + + public partial class HttpPipeline : ISendAsync + { + private ISendAsync pipeline; + private ISendAsyncTerminalFactory terminal; + private List steps = new List(); + + public HttpPipeline() : this(new HttpClientFactory()) + { + } + + public HttpPipeline(ISendAsyncTerminalFactory terminalStep) + { + if (terminalStep == null) + { + throw new System.ArgumentNullException(nameof(terminalStep), "Terminal Step Factory in HttpPipeline may not be null"); + } + TerminalFactory = terminalStep; + } + + /// + /// Returns an HttpPipeline with the current state of this pipeline. + /// + public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + + public ISendAsyncTerminalFactory TerminalFactory + { + get => terminal; + set + { + if (value == null) + { + throw new System.ArgumentNullException("TerminalFactory in HttpPipeline may not be null"); + } + terminal = value; + } + } + + public ISendAsync Pipeline + { + get + { + // if the pipeline has been created and not invalidated, return it. + if (this.pipeline != null) + { + return this.pipeline; + } + + // create the pipeline from scratch. + var next = terminal.Create(); + foreach (var factory in steps) + { + // skip factories that return null. + next = factory.Create(next) ?? next; + } + return this.pipeline = next; + } + } + + public int Count => steps.Count; + + public HttpPipeline Prepend(ISendAsyncFactory item) + { + if (item != null) + { + steps.Add(item); + pipeline = null; + } + return this; + } + + public HttpPipeline Append(SendAsyncStep item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStep item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Append(ISendAsyncFactory item) + { + if (item != null) + { + steps.Insert(0, item); + pipeline = null; + } + return this; + } + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(item); + } + } + return this; + } + + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(item); + } + } + return this; + } + + // you can use this as the ISendAsync Implementation + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => Pipeline.SendAsync(request, callback); + } + + internal static partial class Extensions + { + internal static HttpRequestMessage CloneAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.Clone(requestUri, method); + } + } + + internal static Task CloneWithContentAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.CloneWithContent(requestUri, method); + } + } + + /// + /// Clones an HttpRequestMessage (without the content) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = new HttpRequestMessage + { + Method = method ?? original.Method, + RequestUri = requestUri ?? original.RequestUri, + Version = original.Version, + }; + + foreach (KeyValuePair prop in original.Properties) + { + clone.Properties.Add(prop); + } + + foreach (KeyValuePair> header in original.Headers) + { + /* + **temporarily skip cloning telemetry related headers** + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + */ + if (!"x-ms-unique-id".Equals(header.Key) && !"x-ms-client-request-id".Equals(header.Key) && !"CommandName".Equals(header.Key) && !"FullCommandName".Equals(header.Key) && !"ParameterSetName".Equals(header.Key) && !"User-Agent".Equals(header.Key)) + { + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + } + + return clone; + } + + /// + /// Clones an HttpRequestMessage (including the content stream and content headers) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = original.Clone(requestUri, method); + var stream = new System.IO.MemoryStream(); + if (original.Content != null) + { + await original.Content.CopyToAsync(stream).ConfigureAwait(false); + stream.Position = 0; + clone.Content = new StreamContent(stream); + if (original.Content.Headers != null) + { + foreach (var h in original.Content.Headers) + { + clone.Content.Headers.Add(h.Key, h.Value); + } + } + } + return clone; + } + } +} diff --git a/swaggerci/mediaservices/generated/runtime/InfoAttribute.cs b/swaggerci/mediaservices/generated/runtime/InfoAttribute.cs new file mode 100644 index 000000000000..0d0fa039c924 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/InfoAttribute.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + using System; + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Class)] + public class InfoAttribute : Attribute + { + public bool Required { get; set; } = false; + public bool ReadOnly { get; set; } = false; + public Type[] PossibleTypes { get; set; } = new Type[0]; + public string Description { get; set; } = ""; + public string SerializedName { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class CompleterInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class DefaultInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Iso/IsoDate.cs b/swaggerci/mediaservices/generated/runtime/Iso/IsoDate.cs new file mode 100644 index 000000000000..dc282140ee6c --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Iso/IsoDate.cs @@ -0,0 +1,214 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal struct IsoDate + { + internal int Year { get; set; } // 0-3000 + + internal int Month { get; set; } // 1-12 + + internal int Day { get; set; } // 1-31 + + internal int Hour { get; set; } // 0-24 + + internal int Minute { get; set; } // 0-60 (60 is a special case) + + internal int Second { get; set; } // 0-60 (60 is used for leap seconds) + + internal double Millisecond { get; set; } // 0-999.9... + + internal TimeSpan Offset { get; set; } + + internal DateTimeKind Kind { get; set; } + + internal TimeSpan TimeOfDay => new TimeSpan(Hour, Minute, Second); + + internal DateTime ToDateTime() + { + if (Kind == DateTimeKind.Utc || Offset == TimeSpan.Zero) + { + return new DateTime(Year, Month, Day, Hour, Minute, Second, (int)Millisecond, DateTimeKind.Utc); + } + + return ToDateTimeOffset().DateTime; + } + + internal DateTimeOffset ToDateTimeOffset() + { + return new DateTimeOffset( + Year, + Month, + Day, + Hour, + Minute, + Second, + (int)Millisecond, + Offset + ); + } + + internal DateTime ToUtcDateTime() + { + return ToDateTimeOffset().UtcDateTime; + } + + public override string ToString() + { + var sb = new StringBuilder(); + + // yyyy-MM-dd + sb.Append($"{Year}-{Month:00}-{Day:00}"); + + if (TimeOfDay > new TimeSpan(0)) + { + sb.Append($"T{Hour:00}:{Minute:00}"); + + if (TimeOfDay.Seconds > 0) + { + sb.Append($":{Second:00}"); + } + } + + if (Offset.Ticks == 0) + { + sb.Append('Z'); // UTC + } + else + { + if (Offset.Ticks >= 0) + { + sb.Append('+'); + } + + sb.Append($"{Offset.Hours:00}:{Offset.Minutes:00}"); + } + + return sb.ToString(); + } + + internal static IsoDate FromDateTimeOffset(DateTimeOffset date) + { + return new IsoDate { + Year = date.Year, + Month = date.Month, + Day = date.Day, + Hour = date.Hour, + Minute = date.Minute, + Second = date.Second, + Offset = date.Offset, + Kind = date.Offset == TimeSpan.Zero ? DateTimeKind.Utc : DateTimeKind.Unspecified + }; + } + + private static readonly char[] timeSeperators = { ':', '.' }; + + internal static IsoDate Parse(string text) + { + var tzIndex = -1; + var timeIndex = text.IndexOf('T'); + + var builder = new IsoDate { Day = 1, Month = 1 }; + + // TODO: strip the time zone offset off the end + string dateTime = text; + string timeZone = null; + + if (dateTime.IndexOf('Z') > -1) + { + tzIndex = dateTime.LastIndexOf('Z'); + + builder.Kind = DateTimeKind.Utc; + } + else if (dateTime.LastIndexOf('+') > 10) + { + tzIndex = dateTime.LastIndexOf('+'); + } + else if (dateTime.LastIndexOf('-') > 10) + { + tzIndex = dateTime.LastIndexOf('-'); + } + + if (tzIndex > -1) + { + timeZone = dateTime.Substring(tzIndex); + dateTime = dateTime.Substring(0, tzIndex); + } + + string date = (timeIndex == -1) ? dateTime : dateTime.Substring(0, timeIndex); + + var dateParts = date.Split(Seperator.Dash); // '-' + + for (int i = 0; i < dateParts.Length; i++) + { + var part = dateParts[i]; + + switch (i) + { + case 0: builder.Year = int.Parse(part); break; + case 1: builder.Month = int.Parse(part); break; + case 2: builder.Day = int.Parse(part); break; + } + } + + if (timeIndex > -1) + { + string[] timeParts = dateTime.Substring(timeIndex + 1).Split(timeSeperators); + + for (int i = 0; i < timeParts.Length; i++) + { + var part = timeParts[i]; + + switch (i) + { + case 0: builder.Hour = int.Parse(part); break; + case 1: builder.Minute = int.Parse(part); break; + case 2: builder.Second = int.Parse(part); break; + case 3: builder.Millisecond = double.Parse("0." + part) * 1000; break; + } + } + } + + if (timeZone != null && timeZone != "Z") + { + var hours = int.Parse(timeZone.Substring(1, 2)); + var minutes = int.Parse(timeZone.Substring(4, 2)); + + if (timeZone[0] == '-') + { + hours = -hours; + minutes = -minutes; + } + + builder.Offset = new TimeSpan(hours, minutes, 0); + } + + return builder; + } + } + + /* + YYYY # eg 1997 + YYYY-MM # eg 1997-07 + YYYY-MM-DD # eg 1997-07-16 + YYYY-MM-DDThh:mmTZD # eg 1997-07-16T19:20+01:00 + YYYY-MM-DDThh:mm:ssTZD # eg 1997-07-16T19:20:30+01:00 + YYYY-MM-DDThh:mm:ss.sTZD # eg 1997-07-16T19:20:30.45+01:00 + + where: + + YYYY = four-digit year + MM = two-digit month (01=January, etc.) + DD = two-digit day of month (01 through 31) + hh = two digits of hour (00 through 23) (am/pm NOT allowed) + mm = two digits of minute (00 through 59) + ss = two digits of second (00 through 59) + s = one or more digits representing a decimal fraction of a second + TZD = time zone designator (Z or +hh:mm or -hh:mm) + */ +} diff --git a/swaggerci/mediaservices/generated/runtime/JsonType.cs b/swaggerci/mediaservices/generated/runtime/JsonType.cs new file mode 100644 index 000000000000..2e10fd74dad6 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/JsonType.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal enum JsonType + { + Null = 0, + Object = 1, + Array = 2, + Binary = 3, + Boolean = 4, + Date = 5, + Number = 6, + String = 7 + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Method.cs b/swaggerci/mediaservices/generated/runtime/Method.cs new file mode 100644 index 000000000000..91e642cd89fb --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Method.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + internal static class Method + { + internal static System.Net.Http.HttpMethod Get = System.Net.Http.HttpMethod.Get; + internal static System.Net.Http.HttpMethod Put = System.Net.Http.HttpMethod.Put; + internal static System.Net.Http.HttpMethod Head = System.Net.Http.HttpMethod.Head; + internal static System.Net.Http.HttpMethod Post = System.Net.Http.HttpMethod.Post; + internal static System.Net.Http.HttpMethod Delete = System.Net.Http.HttpMethod.Delete; + internal static System.Net.Http.HttpMethod Options = System.Net.Http.HttpMethod.Options; + internal static System.Net.Http.HttpMethod Trace = System.Net.Http.HttpMethod.Trace; + internal static System.Net.Http.HttpMethod Patch = new System.Net.Http.HttpMethod("PATCH"); + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Models/JsonMember.cs b/swaggerci/mediaservices/generated/runtime/Models/JsonMember.cs new file mode 100644 index 000000000000..d1704d6f27d1 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Models/JsonMember.cs @@ -0,0 +1,83 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + + + internal sealed class JsonMember + { + private readonly TypeDetails type; + + private readonly Func getter; + private readonly Action setter; + + internal JsonMember(PropertyInfo property, int defaultOrder) + { + getter = property.GetValue; + setter = property.SetValue; + + var dataMember = property.GetCustomAttribute(); + + Name = dataMember?.Name ?? property.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(property.PropertyType); + + CanRead = property.CanRead; + } + + internal JsonMember(FieldInfo field, int defaultOrder) + { + getter = field.GetValue; + setter = field.SetValue; + + var dataMember = field.GetCustomAttribute(); + + Name = dataMember?.Name ?? field.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(field.FieldType); + + CanRead = true; + } + + internal string Name { get; } + + internal int Order { get; } + + internal TypeDetails TypeDetails => type; + + internal Type Type => type.NonNullType; + + internal bool IsList => type.IsList; + + // Arrays, Sets, ... + internal Type ElementType => type.ElementType; + + internal IJsonConverter Converter => type.JsonConverter; + + internal bool EmitDefaultValue { get; } + + internal bool IsStringLike => type.IsStringLike; + + internal object DefaultValue => type.DefaultValue; + + internal bool CanRead { get; } + + #region Helpers + + internal object GetValue(object instance) => getter(instance); + + internal void SetValue(object instance, object value) => setter(instance, value); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Models/JsonModel.cs b/swaggerci/mediaservices/generated/runtime/Models/JsonModel.cs new file mode 100644 index 000000000000..775cc695251b --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Models/JsonModel.cs @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal class JsonModel + { + private Dictionary map; + private readonly object _sync = new object(); + + private JsonModel(Type type, List members) + { + Type = type ?? throw new ArgumentNullException(nameof(type)); + Members = members ?? throw new ArgumentNullException(nameof(members)); + } + + internal string Name => Type.Name; + + internal Type Type { get; } + + internal List Members { get; } + + internal JsonMember this[string name] + { + get + { + if (map == null) + { + lock (_sync) + { + if (map == null) + { + map = new Dictionary(); + + foreach (JsonMember m in Members) + { + map[m.Name.ToLower()] = m; + } + } + } + } + + + map.TryGetValue(name.ToLower(), out JsonMember member); + + return member; + } + } + + internal static JsonModel FromType(Type type) + { + var members = new List(); + + int i = 0; + + // BindingFlags.Instance | BindingFlags.Public + + foreach (var member in type.GetFields()) + { + if (member.IsStatic) continue; + + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + foreach (var member in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + members.Sort((a, b) => a.Order.CompareTo(b.Order)); // inline sort + + return new JsonModel(type, members); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Models/JsonModelCache.cs b/swaggerci/mediaservices/generated/runtime/Models/JsonModelCache.cs new file mode 100644 index 000000000000..84c7365b4c93 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Models/JsonModelCache.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal static class JsonModelCache + { + private static readonly ConditionalWeakTable cache + = new ConditionalWeakTable(); + + internal static JsonModel Get(Type type) => cache.GetValue(type, Create); + + private static JsonModel Create(Type type) => JsonModel.FromType(type); + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/Collections/JsonArray.cs b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/JsonArray.cs new file mode 100644 index 000000000000..195991d52042 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/JsonArray.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public abstract partial class JsonArray : JsonNode, IEnumerable + { + internal override JsonType Type => JsonType.Array; + + internal abstract JsonType? ElementType { get; } + + public abstract int Count { get; } + + internal virtual bool IsSet => false; + + internal bool IsEmpty => Count == 0; + + #region IEnumerable + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + #endregion + + #region Static Helpers + + internal static JsonArray Create(short[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(int[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(long[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(decimal[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(float[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(string[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(XBinary[] values) + => new XImmutableArray(values); + + #endregion + + internal static new JsonArray Parse(string text) + => (JsonArray)JsonNode.Parse(text); + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XImmutableArray.cs b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XImmutableArray.cs new file mode 100644 index 000000000000..32e94ff34400 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XImmutableArray.cs @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal sealed class XImmutableArray : JsonArray, IEnumerable + { + private readonly T[] values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XImmutableArray(T[] values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Length; + + public bool IsReadOnly => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + #region Static Constructor + + internal XImmutableArray Create(T[] items) + { + return new XImmutableArray(items); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XList.cs b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XList.cs new file mode 100644 index 000000000000..3583ab895c5b --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XList.cs @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal sealed class XList : JsonArray, IEnumerable + { + private readonly IList values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XList(IList values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Count; + + public bool IsReadOnly => values.IsReadOnly; + + #region IList + + public void Add(T value) + { + values.Add(value); + } + + public bool Contains(T value) => values.Contains(value); + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XNodeArray.cs b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XNodeArray.cs new file mode 100644 index 000000000000..5b93521ae729 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -0,0 +1,68 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed partial class XNodeArray : JsonArray, ICollection + { + private readonly List items; + + internal XNodeArray() + { + items = new List(); + } + + internal XNodeArray(params JsonNode[] values) + { + items = new List(values); + } + + public override JsonNode this[int index] => items[index]; + + internal override JsonType? ElementType => null; + + public bool IsReadOnly => false; + + public override int Count => items.Count; + + #region ICollection Members + + public void Add(JsonNode item) + { + items.Add(item); + } + + void ICollection.Clear() + { + items.Clear(); + } + + public bool Contains(JsonNode item) => items.Contains(item); + + void ICollection.CopyTo(JsonNode[] array, int arrayIndex) + { + items.CopyTo(array, arrayIndex); + } + + public bool Remove(JsonNode item) + { + return items.Remove(item); + } + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XSet.cs b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XSet.cs new file mode 100644 index 000000000000..14f35d474c54 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/Collections/XSet.cs @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal sealed class XSet : JsonArray, IEnumerable + { + private readonly HashSet values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XSet(IEnumerable values) + : this(new HashSet(values)) + { } + + internal XSet(HashSet values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + internal override JsonType Type => JsonType.Array; + + internal override JsonType? ElementType => elementType; + + public bool IsReadOnly => true; + + public override int Count => values.Count; + + internal override bool IsSet => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + internal HashSet AsHashSet() => values; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/JsonBoolean.cs b/swaggerci/mediaservices/generated/runtime/Nodes/JsonBoolean.cs new file mode 100644 index 000000000000..8d1293eae47f --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/JsonBoolean.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal sealed partial class JsonBoolean : JsonNode + { + internal static readonly JsonBoolean True = new JsonBoolean(true); + internal static readonly JsonBoolean False = new JsonBoolean(false); + + internal JsonBoolean(bool value) + { + Value = value; + } + + internal bool Value { get; } + + internal override JsonType Type => JsonType.Boolean; + + internal static new JsonBoolean Parse(string text) + { + switch (text) + { + case "false": return False; + case "true": return True; + + default: throw new ArgumentException($"Expected true or false. Was {text}."); + } + } + + #region Implicit Casts + + public static implicit operator bool(JsonBoolean data) => data.Value; + + public static implicit operator JsonBoolean(bool data) => new JsonBoolean(data); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/JsonDate.cs b/swaggerci/mediaservices/generated/runtime/Nodes/JsonDate.cs new file mode 100644 index 000000000000..0c280bf25d44 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/JsonDate.cs @@ -0,0 +1,173 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + + + internal sealed partial class JsonDate : JsonNode, IEquatable, IComparable + { + internal static bool AssumeUtcWhenKindIsUnspecified = true; + + private readonly DateTimeOffset value; + + internal JsonDate(DateTime value) + { + if (value.Kind == DateTimeKind.Unspecified && AssumeUtcWhenKindIsUnspecified) + { + value = DateTime.SpecifyKind(value, DateTimeKind.Utc); + } + + this.value = value; + } + + internal JsonDate(DateTimeOffset value) + { + this.value = value; + } + + internal override JsonType Type => JsonType.Date; + + #region Helpers + + internal DateTimeOffset ToDateTimeOffset() + { + return value; + } + + internal DateTime ToDateTime() + { + if (value.Offset == TimeSpan.Zero) + { + return value.UtcDateTime; + } + + return value.DateTime; + } + + internal DateTime ToUtcDateTime() => value.UtcDateTime; + + internal int ToUnixTimeSeconds() + { + return (int)value.ToUnixTimeSeconds(); + } + + internal long ToUnixTimeMilliseconds() + { + return (int)value.ToUnixTimeMilliseconds(); + } + + internal string ToIsoString() + { + return IsoDate.FromDateTimeOffset(value).ToString(); + } + + #endregion + + public override string ToString() + { + return ToIsoString(); + } + + internal static new JsonDate Parse(string text) + { + if (text == null) throw new ArgumentNullException(nameof(text)); + + // TODO support: unixtimeseconds.partialseconds + + if (text.Length > 4 && _IsNumber(text)) // UnixTime + { + var date = DateTimeOffset.FromUnixTimeSeconds(long.Parse(text)); + + return new JsonDate(date); + } + else if (text.Length <= 4 || text[4] == '-') // ISO: 2012- + { + return new JsonDate(IsoDate.Parse(text).ToDateTimeOffset()); + } + else + { + // NOT ISO ENCODED + // "Thu, 5 Apr 2012 16:59:01 +0200", + return new JsonDate(DateTimeOffset.Parse(text)); + } + } + + private static bool _IsNumber(string text) + { + foreach (var c in text) + { + if (!char.IsDigit(c)) return false; + } + + return true; + } + + internal static JsonDate FromUnixTime(int seconds) + { + return new JsonDate(DateTimeOffset.FromUnixTimeSeconds(seconds)); + } + + internal static JsonDate FromUnixTime(double seconds) + { + var milliseconds = (long)(seconds * 1000d); + + return new JsonDate(DateTimeOffset.FromUnixTimeMilliseconds(milliseconds)); + } + + #region Implicit Casts + + public static implicit operator DateTimeOffset(JsonDate value) + => value.ToDateTimeOffset(); + + public static implicit operator DateTime(JsonDate value) + => value.ToDateTime(); + + // From Date + public static implicit operator JsonDate(DateTimeOffset value) + { + return new JsonDate(value); + } + + public static implicit operator JsonDate(DateTime value) + { + return new JsonDate(value); + } + + // From String + public static implicit operator JsonDate(string value) + { + return Parse(value); + } + + #endregion + + #region Equality + + public override bool Equals(object obj) + { + return obj is JsonDate date && date.value == this.value; + } + + public bool Equals(JsonDate other) + { + return this.value == other.value; + } + + public override int GetHashCode() => value.GetHashCode(); + + #endregion + + #region IComparable Members + + int IComparable.CompareTo(JsonDate other) + { + return value.CompareTo(other.value); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/JsonNode.cs b/swaggerci/mediaservices/generated/runtime/Nodes/JsonNode.cs new file mode 100644 index 000000000000..6b2447a9c12b --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/JsonNode.cs @@ -0,0 +1,250 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + + + public abstract partial class JsonNode + { + internal abstract JsonType Type { get; } + + public virtual JsonNode this[int index] => throw new NotImplementedException(); + + public virtual JsonNode this[string name] + { + get => throw new NotImplementedException(); + set => throw new NotImplementedException(); + } + + #region Type Helpers + + internal bool IsArray => Type == JsonType.Array; + + internal bool IsDate => Type == JsonType.Date; + + internal bool IsObject => Type == JsonType.Object; + + internal bool IsNumber => Type == JsonType.Number; + + internal bool IsNull => Type == JsonType.Null; + + #endregion + + internal void WriteTo(TextWriter textWriter, bool pretty = true) + { + var writer = new JsonWriter(textWriter, pretty); + + writer.WriteNode(this); + } + + internal T As() + where T : new() + => new JsonSerializer().Deseralize((JsonObject)this); + + internal T[] ToArrayOf() + { + return (T[])new JsonSerializer().DeserializeArray(typeof(T[]), (JsonArray)this); + } + + #region ToString Overrides + + public override string ToString() => ToString(pretty: true); + + internal string ToString(bool pretty) + { + var sb = new StringBuilder(); + + using (var writer = new StringWriter(sb)) + { + WriteTo(writer, pretty); + + return sb.ToString(); + } + } + + #endregion + + #region Static Constructors + + internal static JsonNode Parse(string text) + { + return Parse(new SourceReader(new StringReader(text))); + } + + internal static JsonNode Parse(TextReader textReader) + => Parse(new SourceReader(textReader)); + + private static JsonNode Parse(SourceReader sourceReader) + { + using (var parser = new JsonParser(sourceReader)) + { + return parser.ReadNode(); + } + } + + internal static JsonNode FromObject(object instance) + => new JsonSerializer().Serialize(instance); + + #endregion + + #region Implict Casts + + public static implicit operator string(JsonNode node) => node.ToString(); + + #endregion + + #region Explict Casts + + public static explicit operator DateTime(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date: + return ((JsonDate)node).ToDateTime(); + + case JsonType.String: + return JsonDate.Parse(node.ToString()).ToDateTime(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num).UtcDateTime; + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)).UtcDateTime; + } + } + + throw new ConversionException(node, typeof(DateTime)); + } + + public static explicit operator DateTimeOffset(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date : return ((JsonDate)node).ToDateTimeOffset(); + case JsonType.String : return JsonDate.Parse(node.ToString()).ToDateTimeOffset(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num); + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)); + } + + } + + throw new ConversionException(node, typeof(DateTimeOffset)); + } + + public static explicit operator float(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return float.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(float)); + } + + public static explicit operator double(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return double.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(double)); + } + + public static explicit operator decimal(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return decimal.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(decimal)); + } + + public static explicit operator Guid(JsonNode node) + => new Guid(node.ToString()); + + public static explicit operator short(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return short.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(short)); + } + + public static explicit operator int(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return int.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(int)); + } + + public static explicit operator long(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return long.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(long)); + } + + public static explicit operator bool(JsonNode node) + => ((JsonBoolean)node).Value; + + public static explicit operator ushort(JsonNode node) + => (JsonNumber)node; + + public static explicit operator uint(JsonNode node) + => (JsonNumber)node; + + public static explicit operator ulong(JsonNode node) + => (JsonNumber)node; + + public static explicit operator TimeSpan(JsonNode node) + => TimeSpan.Parse(node.ToString()); + + public static explicit operator Uri(JsonNode node) + { + if (node.Type == JsonType.String) + { + return new Uri(node.ToString()); + } + + throw new ConversionException(node, typeof(Uri)); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/JsonNumber.cs b/swaggerci/mediaservices/generated/runtime/Nodes/JsonNumber.cs new file mode 100644 index 000000000000..e0c6068fe018 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/JsonNumber.cs @@ -0,0 +1,109 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed partial class JsonNumber : JsonNode + { + private readonly string value; + private readonly bool overflows = false; + + internal JsonNumber(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal JsonNumber(int value) + { + this.value = value.ToString(); + } + + internal JsonNumber(long value) + { + this.value = value.ToString(); + + if (value > 9007199254740991) + { + overflows = true; + } + } + + internal JsonNumber(float value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal JsonNumber(double value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal override JsonType Type => JsonType.Number; + + internal string Value => value; + + #region Helpers + + internal bool Overflows => overflows; + + internal bool IsInteger => !value.Contains("."); + + internal bool IsFloat => value.Contains("."); + + #endregion + + #region Casting + + public static implicit operator byte(JsonNumber number) + => byte.Parse(number.Value); + + public static implicit operator short(JsonNumber number) + => short.Parse(number.Value); + + public static implicit operator int(JsonNumber number) + => int.Parse(number.Value); + + public static implicit operator long(JsonNumber number) + => long.Parse(number.value); + + public static implicit operator UInt16(JsonNumber number) + => ushort.Parse(number.Value); + + public static implicit operator UInt32(JsonNumber number) + => uint.Parse(number.Value); + + public static implicit operator UInt64(JsonNumber number) + => ulong.Parse(number.Value); + + public static implicit operator decimal(JsonNumber number) + => decimal.Parse(number.Value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator Double(JsonNumber number) + => double.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator float(JsonNumber number) + => float.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator JsonNumber(short data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(int data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(long data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(Single data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(double data) + => new JsonNumber(data.ToString()); + + #endregion + + public override string ToString() => value; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/JsonObject.cs b/swaggerci/mediaservices/generated/runtime/Nodes/JsonObject.cs new file mode 100644 index 000000000000..4d13baf54257 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/JsonObject.cs @@ -0,0 +1,172 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public partial class JsonObject : JsonNode, IDictionary + { + private readonly Dictionary items; + + internal JsonObject() + { + items = new Dictionary(); + } + + internal JsonObject(IEnumerable> properties) + { + if (properties == null) throw new ArgumentNullException(nameof(properties)); + + items = new Dictionary(); + + foreach (var field in properties) + { + items.Add(field.Key, field.Value); + } + } + + #region IDictionary Constructors + + internal JsonObject(IDictionary dic) + { + items = new Dictionary(dic.Count); + + foreach (var pair in dic) + { + Add(pair.Key, pair.Value); + } + } + + #endregion + + internal override JsonType Type => JsonType.Object; + + #region Add Overloads + + public void Add(string name, JsonNode value) => + items.Add(name, value); + + public void Add(string name, byte[] value) => + items.Add(name, new XBinary(value)); + + public void Add(string name, DateTime value) => + items.Add(name, new JsonDate(value)); + + public void Add(string name, int value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, long value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, float value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, double value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, string value) => + items.Add(name, new JsonString(value)); + + public void Add(string name, bool value) => + items.Add(name, new JsonBoolean(value)); + + public void Add(string name, Uri url) => + items.Add(name, new JsonString(url.AbsoluteUri)); + + public void Add(string name, string[] values) => + items.Add(name, new XImmutableArray(values)); + + public void Add(string name, int[] values) => + items.Add(name, new XImmutableArray(values)); + + #endregion + + #region ICollection> Members + + void ICollection>.Add(KeyValuePair item) + { + items.Add(item.Key, item.Value); + } + + void ICollection>.Clear() + { + items.Clear(); + } + + bool ICollection>.Contains(KeyValuePair item) => + throw new NotImplementedException(); + + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => + throw new NotImplementedException(); + + + int ICollection>.Count => items.Count; + + bool ICollection>.IsReadOnly => false; + + bool ICollection>.Remove(KeyValuePair item) => + throw new NotImplementedException(); + + #endregion + + #region IDictionary Members + + public bool ContainsKey(string key) => items.ContainsKey(key); + + public ICollection Keys => items.Keys; + + public bool Remove(string key) => items.Remove(key); + + public bool TryGetValue(string key, out JsonNode value) => + items.TryGetValue(key, out value); + + public ICollection Values => items.Values; + + public override JsonNode this[string key] + { + get => items[key]; + set => items[key] = value; + } + + #endregion + + #region IEnumerable + + IEnumerator> IEnumerable>.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + + #region Helpers + + internal static new JsonObject FromObject(object instance) => + (JsonObject)new JsonSerializer().Serialize(instance); + + #endregion + + #region Static Constructors + + internal static JsonObject FromStream(Stream stream) + { + using (var tr = new StreamReader(stream)) + { + return (JsonObject)Parse(tr); + } + } + + internal static new JsonObject Parse(string text) + { + return (JsonObject)JsonNode.Parse(text); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/JsonString.cs b/swaggerci/mediaservices/generated/runtime/Nodes/JsonString.cs new file mode 100644 index 000000000000..b4774c1f59b0 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/JsonString.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed partial class JsonString : JsonNode, IEquatable + { + private readonly string value; + + internal JsonString(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal override JsonType Type => JsonType.String; + + internal string Value => value; + + internal int Length => value.Length; + + #region #region Implicit Casts + + public static implicit operator string(JsonString data) => data.Value; + + public static implicit operator JsonString(string value) => new JsonString(value); + + #endregion + + public override int GetHashCode() => value.GetHashCode(); + + public override string ToString() => value; + + #region IEquatable + + bool IEquatable.Equals(JsonString other) => this.Value == other.Value; + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/XBinary.cs b/swaggerci/mediaservices/generated/runtime/Nodes/XBinary.cs new file mode 100644 index 000000000000..5bec86e02929 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/XBinary.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal sealed class XBinary : JsonNode + { + private readonly byte[] _value; + private readonly string _base64; + + internal XBinary(byte[] value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal XBinary(string base64EncodedString) + { + _base64 = base64EncodedString ?? throw new ArgumentNullException(nameof(base64EncodedString)); + } + + internal override JsonType Type => JsonType.Binary; + + internal byte[] Value => _value ?? Convert.FromBase64String(_base64); + + #region #region Implicit Casts + + public static implicit operator byte[] (XBinary data) => data.Value; + + public static implicit operator XBinary(byte[] data) => new XBinary(data); + + #endregion + + public override int GetHashCode() => Value.GetHashCode(); + + public override string ToString() => _base64 ?? Convert.ToBase64String(_value); + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Nodes/XNull.cs b/swaggerci/mediaservices/generated/runtime/Nodes/XNull.cs new file mode 100644 index 000000000000..96e8a7cce050 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Nodes/XNull.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal sealed class XNull : JsonNode + { + internal static readonly XNull Instance = new XNull(); + + private XNull() { } + + internal override JsonType Type => JsonType.Null; + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Parser/Exceptions/ParseException.cs b/swaggerci/mediaservices/generated/runtime/Parser/Exceptions/ParseException.cs new file mode 100644 index 000000000000..aaec8b38acd9 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Parser/Exceptions/ParseException.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal class ParserException : Exception + { + internal ParserException(string message) + : base(message) + { } + + internal ParserException(string message, SourceLocation location) + : base(message) + { + + Location = location; + } + + internal SourceLocation Location { get; } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Parser/JsonParser.cs b/swaggerci/mediaservices/generated/runtime/Parser/JsonParser.cs new file mode 100644 index 000000000000..f2d46371e278 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Parser/JsonParser.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public class JsonParser : IDisposable + { + private readonly TokenReader reader; + + internal JsonParser(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonParser(SourceReader sourceReader) + { + if (sourceReader == null) + throw new ArgumentNullException(nameof(sourceReader)); + + this.reader = new TokenReader(new JsonTokenizer(sourceReader)); + + this.reader.Next(); // Start with the first token + } + + internal IEnumerable ReadNodes() + { + JsonNode node; + + while ((node = ReadNode()) != null) yield return node; + } + + internal JsonNode ReadNode() + { + if (reader.Current.Kind == TokenKind.Eof || reader.Current.IsTerminator) + { + return null; + } + + switch (reader.Current.Kind) + { + case TokenKind.LeftBrace : return ReadObject(); // { + case TokenKind.LeftBracket : return ReadArray(); // [ + + default: throw new ParserException($"Expected '{{' or '['. Was {reader.Current}."); + } + } + + private JsonNode ReadFieldValue() + { + // Boolean, Date, Null, Number, String, Uri + if (reader.Current.IsLiteral) + { + return ReadLiteral(); + } + else + { + switch (reader.Current.Kind) + { + case TokenKind.LeftBracket: return ReadArray(); + case TokenKind.LeftBrace : return ReadObject(); + + default: throw new ParserException($"Unexpected token reading field value. Was {reader.Current}."); + } + } + } + + private JsonNode ReadLiteral() + { + var literal = reader.Current; + + reader.Next(); // Read the literal token + + switch (literal.Kind) + { + case TokenKind.Boolean : return JsonBoolean.Parse(literal.Value); + case TokenKind.Null : return XNull.Instance; + case TokenKind.Number : return new JsonNumber(literal.Value); + case TokenKind.String : return new JsonString(literal.Value); + + default: throw new ParserException($"Unexpected token reading literal. Was {literal}."); + } + } + + internal JsonObject ReadObject() + { + reader.Ensure(TokenKind.LeftBrace, "object"); + + reader.Next(); // Read '{' (Object start) + + var jsonObject = new JsonObject(); + + // Read the object's fields until we reach the end of the object ('}') + while (reader.Current.Kind != TokenKind.RightBrace) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read ',' (Seperator) + } + + // Ensure we have a field name + reader.Ensure(TokenKind.String, "Expected field name"); + + var field = ReadField(); + + jsonObject.Add(field.Key, field.Value); + } + + reader.Next(); // Read '}' (Object end) + + return jsonObject; + } + + + // TODO: Use ValueTuple in C#7 + private KeyValuePair ReadField() + { + var fieldName = reader.Current.Value; + + reader.Next(); // Read the field name + + reader.Ensure(TokenKind.Colon, "field"); + + reader.Next(); // Read ':' (Field value indicator) + + return new KeyValuePair(fieldName, ReadFieldValue()); + } + + + internal JsonArray ReadArray() + { + reader.Ensure(TokenKind.LeftBracket, "array"); + + var array = new XNodeArray(); + + reader.Next(); // Read the '[' (Array start) + + // Read the array's items + while (reader.Current.Kind != TokenKind.RightBracket) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read the ',' (Seperator) + } + + if (reader.Current.IsLiteral) + { + array.Add(ReadLiteral()); // Boolean, Date, Number, Null, String, Uri + } + else if (reader.Current.Kind == TokenKind.LeftBracket) + { + array.Add(ReadArray()); // Array + } + else if (reader.Current.Kind == TokenKind.LeftBrace) + { + array.Add(ReadObject()); // Object + } + else + { + throw new ParserException($"Expected comma, literal, or object. Was {reader.Current}."); + } + } + + reader.Next(); // Read the ']' (Array end) + + return array; + } + + #region IDisposable + + public void Dispose() + { + reader.Dispose(); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Parser/JsonToken.cs b/swaggerci/mediaservices/generated/runtime/Parser/JsonToken.cs new file mode 100644 index 000000000000..a9ce230ea02e --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Parser/JsonToken.cs @@ -0,0 +1,66 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal enum TokenKind + { + LeftBrace, // { Object start + RightBrace, // } Object end + + LeftBracket, // [ Array start + RightBracket, // ] Array end + + Comma, // , Comma + Colon, // : Value indicator + Dot, // . Access field indicator + Terminator, // \0 Stream terminator + + Boolean = 31, // true or false + Null = 33, // null + Number = 34, // i.e. -1.93, -1, 0, 1, 1.1 + String = 35, // i.e. "text" + + Eof = 50 + } + + internal /* readonly */ struct JsonToken + { + internal static readonly JsonToken BraceOpen = new JsonToken(TokenKind.LeftBrace, "{"); + internal static readonly JsonToken BraceClose = new JsonToken(TokenKind.RightBrace, "}"); + + internal static readonly JsonToken BracketOpen = new JsonToken(TokenKind.LeftBracket, "["); + internal static readonly JsonToken BracketClose = new JsonToken(TokenKind.RightBracket, "]"); + + internal static readonly JsonToken Colon = new JsonToken(TokenKind.Colon, ":"); + internal static readonly JsonToken Comma = new JsonToken(TokenKind.Comma, ","); + internal static readonly JsonToken Terminator = new JsonToken(TokenKind.Terminator, "\0"); + + internal static readonly JsonToken True = new JsonToken(TokenKind.Boolean, "true"); + internal static readonly JsonToken False = new JsonToken(TokenKind.Boolean, "false"); + internal static readonly JsonToken Null = new JsonToken(TokenKind.Null, "null"); + + internal static readonly JsonToken Eof = new JsonToken(TokenKind.Eof, null); + + internal JsonToken(TokenKind kind, string value) + { + Kind = kind; + Value = value; + } + + internal readonly TokenKind Kind; + + internal readonly string Value; + + public override string ToString() => Kind + ": " + Value; + + #region Helpers + + internal bool IsLiteral => (byte)Kind > 30 && (byte)Kind < 40; + + internal bool IsTerminator => Kind == TokenKind.Terminator; + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Parser/JsonTokenizer.cs b/swaggerci/mediaservices/generated/runtime/Parser/JsonTokenizer.cs new file mode 100644 index 000000000000..532d7f594a25 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Parser/JsonTokenizer.cs @@ -0,0 +1,177 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + using System.IO; + + + public class JsonTokenizer : IDisposable + { + private readonly StringBuilder sb = new StringBuilder(); + + private readonly SourceReader reader; + + internal JsonTokenizer(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonTokenizer(SourceReader reader) + { + this.reader = reader; + + reader.Next(); // Start with the first char + } + + internal JsonToken ReadNext() + { + reader.SkipWhitespace(); + + if (reader.IsEof) return JsonToken.Eof; + + switch (reader.Current) + { + case '"': return ReadQuotedString(); + + // Symbols + case '[' : reader.Next(); return JsonToken.BracketOpen; // Array start + case ']' : reader.Next(); return JsonToken.BracketClose; // Array end + case ',' : reader.Next(); return JsonToken.Comma; // Value seperator + case ':' : reader.Next(); return JsonToken.Colon; // Field value indicator + case '{' : reader.Next(); return JsonToken.BraceOpen; // Object start + case '}' : reader.Next(); return JsonToken.BraceClose; // Object end + case '\0' : reader.Next(); return JsonToken.Terminator; // Stream terminiator + + default: return ReadLiteral(); + } + } + + private JsonToken ReadQuotedString() + { + Expect('"', "quoted string indicator"); + + reader.Next(); // Read '"' (Starting quote) + + // Read until we reach an unescaped quote char + while (reader.Current != '"') + { + EnsureNotEof("quoted string"); + + if (reader.Current == '\\') + { + char escapedCharacter = reader.ReadEscapeCode(); + + sb.Append(escapedCharacter); + + continue; + } + + StoreCurrentCharacterAndReadNext(); + } + + reader.Next(); // Read '"' (Ending quote) + + return new JsonToken(TokenKind.String, value: sb.Extract()); + } + + private JsonToken ReadLiteral() + { + if (char.IsDigit(reader.Current) || + reader.Current == '-' || + reader.Current == '+') + { + return ReadNumber(); + } + + return ReadIdentifer(); + } + + private JsonToken ReadNumber() + { + // Read until we hit a non-numeric character + // -6.247737e-06 + // E + + while (char.IsDigit(reader.Current) + || reader.Current == '.' + || reader.Current == 'e' + || reader.Current == 'E' + || reader.Current == '-' + || reader.Current == '+') + { + StoreCurrentCharacterAndReadNext(); + } + + return new JsonToken(TokenKind.Number, value: sb.Extract()); + } + + int count = 0; + + private JsonToken ReadIdentifer() + { + count++; + + if (!char.IsLetter(reader.Current)) + { + throw new ParserException( + message : $"Expected literal (number, boolean, or null). Was '{reader.Current}'.", + location : reader.Location + ); + } + + // Read letters, numbers, and underscores '_' + while (char.IsLetterOrDigit(reader.Current) || reader.Current == '_') + { + StoreCurrentCharacterAndReadNext(); + } + + string text = sb.Extract(); + + switch (text) + { + case "true": return JsonToken.True; + case "false": return JsonToken.False; + case "null": return JsonToken.Null; + + default: return new JsonToken(TokenKind.String, text); + } + } + + private void Expect(char character, string description) + { + if (reader.Current != character) + { + throw new ParserException( + message: $"Expected {description} ('{character}'). Was '{reader.Current}'.", + location: reader.Location + ); + } + } + + private void EnsureNotEof(string tokenType) + { + if (reader.IsEof) + { + throw new ParserException( + message: $"Unexpected EOF while reading {tokenType}.", + location: reader.Location + ); + } + } + + private void StoreCurrentCharacterAndReadNext() + { + sb.Append(reader.Current); + + reader.Next(); + } + + public void Dispose() + { + reader.Dispose(); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Parser/Location.cs b/swaggerci/mediaservices/generated/runtime/Parser/Location.cs new file mode 100644 index 000000000000..d8d31fb9140a --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Parser/Location.cs @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal struct SourceLocation + { + private int line; + private int column; + private int position; + + internal SourceLocation(int line = 0, int column = 0, int position = 0) + { + this.line = line; + this.column = column; + this.position = position; + } + + internal int Line => line; + + internal int Column => column; + + internal int Position => position; + + internal void Advance() + { + this.column++; + this.position++; + } + + internal void MarkNewLine() + { + this.line++; + this.column = 0; + } + + internal SourceLocation Clone() + { + return new SourceLocation(line, column, position); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Parser/Readers/SourceReader.cs b/swaggerci/mediaservices/generated/runtime/Parser/Readers/SourceReader.cs new file mode 100644 index 000000000000..3b42286e9d7b --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Parser/Readers/SourceReader.cs @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Globalization; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public sealed class SourceReader : IDisposable + { + private readonly TextReader source; + + private char current; + + private readonly SourceLocation location = new SourceLocation(); + + private bool isEof = false; + + internal SourceReader(TextReader textReader) + { + this.source = textReader ?? throw new ArgumentNullException(nameof(textReader)); + } + + /// + /// Advances to the next character + /// + internal void Next() + { + // Advance to the new line when we see a new line '\n'. + // A new line may be prefixed by a carriage return '\r'. + + if (current == '\n') + { + location.MarkNewLine(); + } + + int charCode = source.Read(); // -1 for end + + if (charCode >= 0) + { + current = (char)charCode; + } + else + { + // If we've already marked this as the EOF, throw an exception + if (isEof) + { + throw new EndOfStreamException("Cannot advance past end of stream."); + } + + isEof = true; + + current = '\0'; + } + + location.Advance(); + } + + internal void SkipWhitespace() + { + while (char.IsWhiteSpace(current)) + { + Next(); + } + } + + internal char ReadEscapeCode() + { + Next(); + + char escapedChar = current; + + Next(); // Consume escaped character + + switch (escapedChar) + { + // Special escape codes + case '"': return '"'; // " (Quotation mark) U+0022 + case '/': return '/'; // / (Solidus) U+002F + case '\\': return '\\'; // \ (Reverse solidus) U+005C + + // Control Characters + case '0': return '\0'; // Nul (0) U+0000 + case 'a': return '\a'; // Alert (7) + case 'b': return '\b'; // Backspace (8) U+0008 + case 'f': return '\f'; // Form feed (12) U+000C + case 'n': return '\n'; // Line feed (10) U+000A + case 'r': return '\r'; // Carriage return (13) U+000D + case 't': return '\t'; // Horizontal tab (9) U+0009 + case 'v': return '\v'; // Vertical tab + + // Unicode escape sequence + case 'u': return ReadUnicodeEscapeSequence(); // U+XXXX + + default: throw new Exception($"Unrecognized escape sequence '\\{escapedChar}'"); + } + } + + private readonly char[] hexCode = new char[4]; + + private char ReadUnicodeEscapeSequence() + { + hexCode[0] = current; Next(); + hexCode[1] = current; Next(); + hexCode[2] = current; Next(); + hexCode[3] = current; Next(); + + return Convert.ToChar(int.Parse( + s : new string(hexCode), + style : NumberStyles.HexNumber, + provider: NumberFormatInfo.InvariantInfo + )); + } + + internal char Current => current; + + internal bool IsEof => isEof; + + internal char Peek() => (char)source.Peek(); + + internal SourceLocation Location => location; + + public void Dispose() + { + source.Dispose(); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Parser/TokenReader.cs b/swaggerci/mediaservices/generated/runtime/Parser/TokenReader.cs new file mode 100644 index 000000000000..097d6c0968b7 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Parser/TokenReader.cs @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + public class TokenReader : IDisposable + { + private readonly JsonTokenizer tokenizer; + private JsonToken current; + + internal TokenReader(JsonTokenizer tokenizer) + { + this.tokenizer = tokenizer ?? throw new ArgumentNullException(nameof(tokenizer)); + } + + internal void Next() + { + current = tokenizer.ReadNext(); + } + + internal JsonToken Current => current; + + internal void Ensure(TokenKind kind, string readerName) + { + if (current.Kind != kind) + { + throw new ParserException($"Expected {kind} while reading {readerName}). Was {current}."); + } + } + + public void Dispose() + { + tokenizer.Dispose(); + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/PipelineMocking.cs b/swaggerci/mediaservices/generated/runtime/PipelineMocking.cs new file mode 100644 index 000000000000..0cc76fcd4769 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/PipelineMocking.cs @@ -0,0 +1,262 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + using System.Threading.Tasks; + using System.Collections.Generic; + using System.Net.Http; + using System.Linq; + using System.Net; + using Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json; + + public enum MockMode + { + Live, + Record, + Playback, + + } + + public class PipelineMock + { + + private System.Collections.Generic.Stack scenario = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack context = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack description = new System.Collections.Generic.Stack(); + + private readonly string recordingPath; + private int counter = 0; + + public static implicit operator Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.SendAsyncStep(PipelineMock instance) => instance.SendAsync; + + public MockMode Mode { get; set; } = MockMode.Live; + public PipelineMock(string recordingPath) + { + this.recordingPath = recordingPath; + } + + public void PushContext(string text) => context.Push(text); + + public void PushDescription(string text) => description.Push(text); + + + public void PushScenario(string it) + { + // reset counter too + counter = 0; + + scenario.Push(it); + } + + public void PopContext() => context.Pop(); + + public void PopDescription() => description.Pop(); + + public void PopScenario() => scenario.Pop(); + + public void SetRecord() => Mode = MockMode.Record; + + public void SetPlayback() => Mode = MockMode.Playback; + + public void SetLive() => Mode = MockMode.Live; + + public string Scenario => (scenario.Count > 0 ? scenario.Peek() : "[NoScenario]"); + public string Description => (description.Count > 0 ? description.Peek() : "[NoDescription]"); + public string Context => (context.Count > 0 ? context.Peek() : "[NoContext]"); + + /// + /// Headers that we substitute out blank values for in the recordings + /// Add additional headers as necessary + /// + public static HashSet Blacklist = new HashSet(System.StringComparer.CurrentCultureIgnoreCase) { + "Authorization", + }; + + public Dictionary ForceResponseHeaders = new Dictionary(); + + internal static XImmutableArray Removed = new XImmutableArray(new string[] { "[Filtered]" }); + + internal static IEnumerable> FilterHeaders(IEnumerable>> headers) => headers.Select(header => new KeyValuePair(header.Key, Blacklist.Contains(header.Key) ? Removed : new XImmutableArray(header.Value.ToArray()))); + + internal static JsonNode SerializeContent(HttpContent content, ref bool isBase64) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result, ref isBase64); + + internal static JsonNode SerializeContent(byte[] content, ref bool isBase64) + { + if (null == content || content.Length == 0) + { + return XNull.Instance; + } + var first = content[0]; + var last = content[content.Length - 1]; + + // plaintext for JSON/SGML/XML/HTML/STRINGS/ARRAYS + if ((first == '{' && last == '}') || (first == '<' && last == '>') || (first == '[' && last == ']') || (first == '"' && last == '"')) + { + return new JsonString(System.Text.Encoding.UTF8.GetString(content)); + } + + // base64 for everyone else + return new JsonString(System.Convert.ToBase64String(content)); + } + + internal static byte[] DeserializeContent(string content, bool isBase64) + { + if (string.IsNullOrWhiteSpace(content)) + { + return new byte[0]; + } + + if (isBase64) + { + try + { + return System.Convert.FromBase64String(content); + } + catch + { + // hmm. didn't work, return it as a string I guess. + } + } + return System.Text.Encoding.UTF8.GetBytes(content); + } + + public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMessage response) + { + var messages = System.IO.File.Exists(this.recordingPath) ? Load() : new JsonObject() ?? new JsonObject(); + bool isBase64Request = false; + bool isBase64Response = false; + messages[rqKey] = new JsonObject { + { "Request",new JsonObject { + { "Method", request.Method.Method }, + { "RequestUri", request.RequestUri }, + { "Content", SerializeContent( request.Content, ref isBase64Request) }, + { "isContentBase64", isBase64Request }, + { "Headers", new JsonObject(FilterHeaders(request.Headers)) }, + { "ContentHeaders", request.Content == null ? new JsonObject() : new JsonObject(FilterHeaders(request.Content.Headers))} + } }, + {"Response", new JsonObject { + { "StatusCode", (int)response.StatusCode}, + { "Headers", new JsonObject(FilterHeaders(response.Headers))}, + { "ContentHeaders", new JsonObject(FilterHeaders(response.Content.Headers))}, + { "Content", SerializeContent(response.Content, ref isBase64Response) }, + { "isContentBase64", isBase64Response }, + }} + }; + System.IO.File.WriteAllText(this.recordingPath, messages.ToString()); + } + + private JsonObject Load() + { + if (System.IO.File.Exists(this.recordingPath)) + { + try + { + return JsonObject.FromStream(System.IO.File.OpenRead(this.recordingPath)); + } + catch + { + throw new System.Exception($"Invalid recording file: '{recordingPath}'"); + } + } + + throw new System.ArgumentException($"Missing recording file: '{recordingPath}'", nameof(recordingPath)); + } + + public HttpResponseMessage LoadMessage(string rqKey) + { + var responses = Load(); + var message = responses.Property(rqKey); + + if (null == message) + { + throw new System.ArgumentException($"Missing Request '{rqKey}' in recording file", nameof(rqKey)); + } + + var sc = 0; + var reqMessage = message.Property("Request"); + var respMessage = message.Property("Response"); + + // --------------------------- deserialize response ---------------------------------------------------------------- + bool isBase64Response = false; + respMessage.BooleanProperty("isContentBase64", ref isBase64Response); + var response = new HttpResponseMessage + { + StatusCode = (HttpStatusCode)respMessage.NumberProperty("StatusCode", ref sc), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"), isBase64Response)) + }; + + foreach (var each in respMessage.Property("Headers")) + { + response.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + foreach (var frh in ForceResponseHeaders) + { + response.Headers.Remove(frh.Key); + response.Headers.TryAddWithoutValidation(frh.Key, frh.Value); + } + + foreach (var each in respMessage.Property("ContentHeaders")) + { + response.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + // --------------------------- deserialize request ---------------------------------------------------------------- + bool isBase64Request = false; + reqMessage.BooleanProperty("isContentBase64", ref isBase64Request); + response.RequestMessage = new HttpRequestMessage + { + Method = new HttpMethod(reqMessage.StringProperty("Method")), + RequestUri = new System.Uri(reqMessage.StringProperty("RequestUri")), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"), isBase64Request)) + }; + + foreach (var each in reqMessage.Property("Headers")) + { + response.RequestMessage.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + foreach (var each in reqMessage.Property("ContentHeaders")) + { + response.RequestMessage.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + return response; + } + + public async Task SendAsync(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + counter++; + var rqkey = $"{Description}+{Context}+{Scenario}+${request.Method.Method}+{request.RequestUri}+{counter}"; + + switch (Mode) + { + case MockMode.Record: + //Add following code since the request.Content will be released after sendAsync + var requestClone = request; + if (requestClone.Content != null) + { + requestClone = await request.CloneWithContent(request.RequestUri, request.Method); + } + // make the call + var response = await next.SendAsync(request, callback); + + // save the message to the recording file + SaveMessage(rqkey, requestClone, response); + + // return the response. + return response; + + case MockMode.Playback: + // load and return the response. + return LoadMessage(rqkey); + + default: + // pass-thru, do nothing + return await next.SendAsync(request, callback); + } + } + } +} diff --git a/swaggerci/mediaservices/generated/runtime/Response.cs b/swaggerci/mediaservices/generated/runtime/Response.cs new file mode 100644 index 000000000000..6a2a3f3c6bc7 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Response.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + using System; + using System.Threading.Tasks; + public class Response : EventData + { + public Response() : base() + { + } + } + + public class Response : Response + { + private Func> _resultDelegate; + private Task _resultValue; + + public Response(T value) : base() => _resultValue = Task.FromResult(value); + public Response(Func value) : base() => _resultDelegate = () => Task.FromResult(value()); + public Response(Func> value) : base() => _resultDelegate = value; + public Task Result => _resultValue ?? (_resultValue = this._resultDelegate()); + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Serialization/JsonSerializer.cs b/swaggerci/mediaservices/generated/runtime/Serialization/JsonSerializer.cs new file mode 100644 index 000000000000..e5812c10ea1c --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Serialization/JsonSerializer.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal class JsonSerializer + { + private int depth = 0; + + private SerializationOptions options = new SerializationOptions(); + + #region Deserialization + + internal T Deseralize(JsonObject json) + where T : new() + { + var contract = JsonModelCache.Get(typeof(T)); + + return (T)DeserializeObject(contract, json); + } + + internal object DeserializeObject(JsonModel contract, JsonObject json) + { + var instance = Activator.CreateInstance(contract.Type); + + depth++; + + // Ensure we don't recurse forever + if (depth > 5) throw new Exception("Depth greater than 5"); + + foreach (var field in json) + { + var member = contract[field.Key]; + + if (member != null) + { + var value = DeserializeValue(member, field.Value); + + member.SetValue(instance, value); + } + } + + depth--; + + return instance; + } + + private object DeserializeValue(JsonMember member, JsonNode value) + { + if (value.Type == JsonType.Null) return null; + + var type = member.Type; + + if (member.IsStringLike && value.Type != JsonType.String) + { + // Take the long path... + return DeserializeObject(JsonModelCache.Get(type), (JsonObject)value); + } + else if (member.Converter != null) + { + return member.Converter.FromJson(value); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (member.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + private object DeserializeValue(Type type, JsonNode value) + { + if (type == null) throw new ArgumentNullException(nameof(type)); + + if (value.Type == JsonType.Null) return null; + + var typeDetails = TypeDetails.Get(type); + + if (typeDetails.JsonConverter != null) + { + return typeDetails.JsonConverter.FromJson(value); + } + else if (typeDetails.IsEnum) + { + return Enum.Parse(type, value.ToString(), ignoreCase: true); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (typeDetails.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + internal Array DeserializeArray(Type type, JsonArray elements) + { + var elementType = type.GetElementType(); + + var elementTypeDetails = TypeDetails.Get(elementType); + + var array = Array.CreateInstance(elementType, elements.Count); + + int i = 0; + + if (elementTypeDetails.JsonConverter != null) + { + foreach (var value in elements) + { + array.SetValue(elementTypeDetails.JsonConverter.FromJson(value), i); + + i++; + } + } + else + { + foreach (var value in elements) + { + array.SetValue(DeserializeValue(elementType, value), i); + + i++; + } + } + + return array; + } + + internal IList DeserializeList(Type type, JsonArray jsonArray) + { + // TODO: Handle non-generic types + if (!type.IsGenericType) + throw new ArgumentException("Must be a generic type", nameof(type)); + + var elementType = type.GetGenericArguments()[0]; + + IList list; + + if (type.IsInterface) + { + // Create a concrete generic list + list = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(elementType)); + } + else + { + list = (IList)Activator.CreateInstance(type); + } + + foreach (var value in jsonArray) + { + list.Add(DeserializeValue(elementType, value)); + } + + return list; + } + + #endregion + + #region Serialization + + internal JsonNode Serialize(object instance) => + Serialize(instance, SerializationOptions.Default); + + internal JsonNode Serialize(object instance, string[] include) => + Serialize(instance, new SerializationOptions { Include = include }); + + internal JsonNode Serialize(object instance, SerializationOptions options) + { + this.options = options; + + if (instance == null) + { + return XNull.Instance; + } + + return ReadValue(instance.GetType(), instance); + } + + #region Readers + + internal JsonArray ReadArray(IEnumerable collection) + { + var array = new XNodeArray(); + + foreach (var item in collection) + { + array.Add(ReadValue(item.GetType(), item)); + } + + return array; + } + + internal IEnumerable> ReadProperties(object instance) + { + var contract = JsonModelCache.Get(instance.GetType()); + + foreach (var member in contract.Members) + { + string name = member.Name; + + if (options.PropertyNameTransformer != null) + { + name = options.PropertyNameTransformer.Invoke(name); + } + + // Skip the field if it's not included + if ((depth == 1 && !options.IsIncluded(name))) + { + continue; + } + + var value = member.GetValue(instance); + + if (!member.EmitDefaultValue && (value == null || (member.IsList && ((IList)value).Count == 0) || value.Equals(member.DefaultValue))) + { + continue; + } + else if (options.IgnoreNullValues && value == null) // Ignore null values + { + continue; + } + + // Transform the value if there is one + if (options.Transformations != null) + { + var transform = options.GetTransformation(name); + + if (transform != null) + { + value = transform.Transformer(value); + } + } + + yield return new KeyValuePair(name, ReadValue(member.TypeDetails, value)); + } + } + + private JsonObject ReadObject(object instance) + { + depth++; + + // TODO: Guard against a self referencing graph + if (depth > options.MaxDepth) + { + depth--; + + return new JsonObject(); + } + + var node = new JsonObject(ReadProperties(instance)); + + depth--; + + return node; + } + + private JsonNode ReadValue(Type type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + var member = TypeDetails.Get(type); + + return ReadValue(member, value); + } + + private JsonNode ReadValue(TypeDetails type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + if (type.JsonConverter != null) + { + return type.JsonConverter.ToJson(value); + } + else if (type.IsArray) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateArray((string[])value); + case TypeCode.UInt16: return CreateArray((ushort[])value); + case TypeCode.UInt32: return CreateArray((uint[])value); + case TypeCode.UInt64: return CreateArray((ulong[])value); + case TypeCode.Int16: return CreateArray((short[])value); + case TypeCode.Int32: return CreateArray((int[])value); + case TypeCode.Int64: return CreateArray((long[])value); + case TypeCode.Single: return CreateArray((float[])value); + case TypeCode.Double: return CreateArray((double[])value); + default: return ReadArray((IEnumerable)value); + } + } + else if (value is IEnumerable) + { + if (type.IsList && type.ElementType != null) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateList(value); + case TypeCode.UInt16: return CreateList(value); + case TypeCode.UInt32: return CreateList(value); + case TypeCode.UInt64: return CreateList(value); + case TypeCode.Int16: return CreateList(value); + case TypeCode.Int32: return CreateList(value); + case TypeCode.Int64: return CreateList(value); + case TypeCode.Single: return CreateList(value); + case TypeCode.Double: return CreateList(value); + } + } + + return ReadArray((IEnumerable)value); + } + else + { + // Complex object + return ReadObject(value); + } + } + + private XList CreateList(object value) => new XList((IList)value); + + private XImmutableArray CreateArray(T[] array) => new XImmutableArray(array); + + #endregion + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Serialization/PropertyTransformation.cs b/swaggerci/mediaservices/generated/runtime/Serialization/PropertyTransformation.cs new file mode 100644 index 000000000000..051f5f0e0ead --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Serialization/PropertyTransformation.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal class PropertyTransformation + { + internal PropertyTransformation(string name, Func transformer) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Transformer = transformer ?? throw new ArgumentNullException(nameof(transformer)); + } + + internal string Name { get; } + + internal Func Transformer { get; } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Serialization/SerializationOptions.cs b/swaggerci/mediaservices/generated/runtime/Serialization/SerializationOptions.cs new file mode 100644 index 000000000000..6171efd97836 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Serialization/SerializationOptions.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal class SerializationOptions + { + internal static readonly SerializationOptions Default = new SerializationOptions(); + + internal SerializationOptions() { } + + internal SerializationOptions( + string[] include = null, + bool ingoreNullValues = false) + { + Include = include; + IgnoreNullValues = ingoreNullValues; + } + + internal string[] Include { get; set; } + + internal string[] Exclude { get; set; } + + internal bool IgnoreNullValues { get; set; } + + internal PropertyTransformation[] Transformations { get; set; } + + internal Func PropertyNameTransformer { get; set; } + + internal int MaxDepth { get; set; } = 5; + + internal bool IsIncluded(string name) + { + if (Exclude != null) + { + return !Exclude.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + else if (Include != null) + { + return Include.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return true; + } + + internal PropertyTransformation GetTransformation(string propertyName) + { + if (Transformations == null) return null; + + foreach (var t in Transformations) + { + if (t.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase)) + { + return t; + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/SerializationMode.cs b/swaggerci/mediaservices/generated/runtime/SerializationMode.cs new file mode 100644 index 000000000000..9746427a9ffb --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/SerializationMode.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + [System.Flags] + public enum SerializationMode + { + None = 0, + IncludeHeaders = 1 << 0, + IncludeReadOnly = 1 << 1, + + IncludeAll = IncludeHeaders | IncludeReadOnly + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/UndeclaredResponseException.cs b/swaggerci/mediaservices/generated/runtime/UndeclaredResponseException.cs new file mode 100644 index 000000000000..2c5198f3784c --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/UndeclaredResponseException.cs @@ -0,0 +1,112 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + using System; + using System.Net.Http; + using System.Net.Http.Headers; + using static Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Extensions; + + public class RestException : Exception, IDisposable + { + public System.Net.HttpStatusCode StatusCode { get; set; } + public string Code { get; protected set; } + protected string message; + public HttpRequestMessage RequestMessage { get; protected set; } + public HttpResponseHeaders ResponseHeaders { get; protected set; } + + public string ResponseBody { get; protected set; } + public string ClientRequestId { get; protected set; } + public string RequestId { get; protected set; } + + public override string Message => message; + public string Action { get; protected set; } + + public RestException(System.Net.Http.HttpResponseMessage response) + { + StatusCode = response.StatusCode; + //CloneWithContent will not work here since the content is disposed after sendAsync + //Besides, it seems there is no need for the request content cloned here. + RequestMessage = response.RequestMessage.Clone(); + ResponseBody = response.Content.ReadAsStringAsync().Result; + ResponseHeaders = response.Headers; + + RequestId = response.GetFirstHeader("x-ms-request-id"); + ClientRequestId = response.GetFirstHeader("x-ms-client-request-id"); + + try + { + // try to parse the body as JSON, and see if a code and message are in there. + var json = Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonNode.Parse(ResponseBody) as Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json.JsonObject; + + // error message could be in properties.statusMessage + { message = If(json?.Property("properties"), out var p) + && If(p?.PropertyT("statusMessage"), out var sm) + ? (string)sm : (string)Message; } + + // see if there is an error block in the body + json = json?.Property("error") ?? json; + + { Code = If(json?.PropertyT("code"), out var c) ? (string)c : (string)StatusCode.ToString(); } + { message = If(json?.PropertyT("message"), out var m) ? (string)m : (string)Message; } + { Action = If(json?.PropertyT("action"), out var a) ? (string)a : (string)Action; } + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // couldn't get the code/message from the body response. + // In this case, we will assume the response is the expected error message + if(!string.IsNullOrEmpty(ResponseBody)) { + message = ResponseBody; + } + } +#endif + if (string.IsNullOrEmpty(message)) + { + if (StatusCode >= System.Net.HttpStatusCode.BadRequest && StatusCode < System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Request Error, Status: {StatusCode}"; + } + else if (StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Server Error, Status: {StatusCode}"; + } + else + { + message = $"The server responded with an unrecognized response, Status: {StatusCode}"; + } + } + } + + public void Dispose() + { + ((IDisposable)RequestMessage).Dispose(); + } + } + + public class RestException : RestException + { + public T Error { get; protected set; } + public RestException(System.Net.Http.HttpResponseMessage response, T error) : base(response) + { + Error = error; + } + } + + + public class UndeclaredResponseException : RestException + { + public UndeclaredResponseException(System.Net.Http.HttpResponseMessage response) : base(response) + { + + } + } +} \ No newline at end of file diff --git a/swaggerci/mediaservices/generated/runtime/Writers/JsonWriter.cs b/swaggerci/mediaservices/generated/runtime/Writers/JsonWriter.cs new file mode 100644 index 000000000000..980deb0b3e4f --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/Writers/JsonWriter.cs @@ -0,0 +1,223 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Web; + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime.Json +{ + internal class JsonWriter + { + const string indentation = " "; // 2 spaces + + private readonly bool pretty; + private readonly TextWriter writer; + + protected int currentLevel = 0; + + internal JsonWriter(TextWriter writer, bool pretty = true) + { + this.writer = writer ?? throw new ArgumentNullException(nameof(writer)); + this.pretty = pretty; + } + + internal void WriteNode(JsonNode node) + { + switch (node.Type) + { + case JsonType.Array: WriteArray((IEnumerable)node); break; + case JsonType.Object: WriteObject((JsonObject)node); break; + + // Primitives + case JsonType.Binary: WriteBinary((XBinary)node); break; + case JsonType.Boolean: WriteBoolean((bool)node); break; + case JsonType.Date: WriteDate((JsonDate)node); break; + case JsonType.Null: WriteNull(); break; + case JsonType.Number: WriteNumber((JsonNumber)node); break; + case JsonType.String: WriteString(node); break; + } + } + + internal void WriteArray(IEnumerable array) + { + currentLevel++; + + writer.Write('['); + + bool doIndentation = false; + + if (pretty) + { + foreach (var node in array) + { + if (node.Type == JsonType.Object || node.Type == JsonType.Array) + { + doIndentation = true; + + break; + } + } + } + + bool isFirst = true; + + foreach (JsonNode node in array) + { + if (!isFirst) writer.Write(','); + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + WriteNode(node); + + isFirst = false; + } + + currentLevel--; + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + writer.Write(']'); + } + + internal void WriteIndent() + { + if (pretty) + { + writer.Write(Environment.NewLine); + + for (int level = 0; level < currentLevel; level++) + { + writer.Write(indentation); + } + } + } + + internal void WriteObject(JsonObject obj) + { + currentLevel++; + + writer.Write('{'); + + bool isFirst = true; + + foreach (var field in obj) + { + if (!isFirst) writer.Write(','); + + WriteIndent(); + + WriteFieldName(field.Key); + + writer.Write(':'); + + if (pretty) + { + writer.Write(' '); + } + + // Write the field value + WriteNode(field.Value); + + isFirst = false; + } + + currentLevel--; + + WriteIndent(); + + writer.Write('}'); + } + + internal void WriteFieldName(string fieldName) + { + writer.Write('"'); + writer.Write(HttpUtility.JavaScriptStringEncode(fieldName)); + writer.Write('"'); + } + + #region Primitives + + internal void WriteBinary(XBinary value) + { + writer.Write('"'); + writer.Write(value.ToString()); + writer.Write('"'); + } + + internal void WriteBoolean(bool value) + { + writer.Write(value ? "true" : "false"); + } + + internal void WriteDate(JsonDate date) + { + if (date.ToDateTime().Year == 1) + { + WriteNull(); + } + else + { + writer.Write('"'); + writer.Write(date.ToIsoString()); + writer.Write('"'); + } + } + + internal void WriteNull() + { + writer.Write("null"); + } + + internal void WriteNumber(JsonNumber number) + { + if (number.Overflows) + { + writer.Write('"'); + writer.Write(number.Value); + writer.Write('"'); + } + else + { + writer.Write(number.Value); + } + } + + internal void WriteString(string text) + { + if (text == null) + { + WriteNull(); + } + else + { + writer.Write('"'); + + writer.Write(HttpUtility.JavaScriptStringEncode(text)); + + writer.Write('"'); + } + } + + #endregion + } +} + + +// TODO: Replace with System.Text.Json when available diff --git a/swaggerci/mediaservices/generated/runtime/delegates.cs b/swaggerci/mediaservices/generated/runtime/delegates.cs new file mode 100644 index 000000000000..c8da0bae9e83 --- /dev/null +++ b/swaggerci/mediaservices/generated/runtime/delegates.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.MediaServices.Runtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData=System.Func; + + public delegate Task SendAsync(HttpRequestMessage request, IEventListener callback); + public delegate Task SendAsyncStep(HttpRequestMessage request, IEventListener callback, ISendAsync next); + public delegate Task SignalEvent(string id, CancellationToken token, GetEventData getEventData); + public delegate Task Event(EventData message); + public delegate void SynchEvent(EventData message); + public delegate Task OnResponse(Response message); + public delegate Task OnResponse(Response message); +} \ No newline at end of file diff --git a/swaggerci/mediaservices/readme.md b/swaggerci/mediaservices/readme.md new file mode 100644 index 000000000000..5c183750a0d9 --- /dev/null +++ b/swaggerci/mediaservices/readme.md @@ -0,0 +1,10 @@ +### AutoRest Configuration +> see https://aka.ms/autorest + +``` yaml +require: + - $(this-folder)/../../tools/SwaggerCI/readme.azure.noprofile.md + - $(this-folder)/../../../azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md +try-require: + - $(this-folder)/../../../azure-rest-api-specs/specification/mediaservices/resource-manager/readme.powershell.md +```